Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Adafruit 16-channel 12-bit pwm/servo shield


  • Please log in to reply
3 replies to this topic

#1 w3n

w3n

    New Member

  • Members
  • Pip
  • 4 posts

Posted 29 December 2014 - 01:08 AM

Hi guys,

 

This is my very first project and I'm trying to make work this shield http://www.adafruit.com/product/1411 with my netduino plus 1 for almost 3 days with not success. I followed all the instructions at the adafruit page on soldering, and so on, but netduino 1 SCL and SDA ports are missing so I need to use the analogic pins4 and 5.

 

I made the red led to turn on, feeding the shield with the 5v output from the netduino, added an extra 5v by the V+, so green and red leds are turned on.

 

I tried to plug the analogic pins 4-5 to the SDA & SCL shield pins, even feeding the line with 3v, but no way to get anyresponse from the device when I try to write or read from the device, for example when I try to read the register MODE1, allways returns 0, no matter what I do, no matter what I write, randomly sometimes writes 2bytes others writes 1byte.. I'm totally lost and confused, so any help/advice/direction  will be wellcome.

 

 



#2 iced98lx

iced98lx

    Advanced Member

  • Members
  • PipPipPip
  • 134 posts
  • LocationSouth Dakota

Posted 31 December 2014 - 05:16 PM

I don't use the shield version, but I have http://www.adafruit.com/products/815working fine on my N+2. I am using pull up resistors off the SC and SD lines. I have that and an LCD backpack running on i2c with no issues. 

 

here is the driver code, I didn't write most of it:

 

http://pastebin.com/QBBhqbiF

 

I then initiate an instance of it:

static readonly Adafruit_PWMServoDriver mainLights = new Adafruit_PWMServoDriver(0x40, 100);

and then pass int's to it after I've determined the power I want:

mainLights.fadeTo((int)(caclLights[0]), (int)(caclLights[1]), (int)(caclLights[2]), (int)(caclLights[3]), (int)(caclLights[4]), 2);

In my case I'm setting a step (0-Max) as a "dim" value of a light which uses PWM, thus all the references to lights. The fade to method is a sub-optimal way of doing that, so I don't suggest you copy it, though it does work to sweep from one setting to another.

 

Hope that helps!



#3 w3n

w3n

    New Member

  • Members
  • Pip
  • 4 posts

Posted 01 January 2015 - 08:08 PM

Hi Iced98lx thanks by your reply!,

I was following your posts and using your driver, tomorrow I they are delivering me the non-shield version, so tomorrow I'll be back on this and see if I'm able to make it work, the funny thing is I don't understand why the shield version is not working I'm starting to suspect  somehow I burned it, because there're a few blogs about people using this same shield with a rasberry pi...



#4 NameOfTheDragon

NameOfTheDragon

    Advanced Member

  • Members
  • PipPipPip
  • 112 posts
  • LocationCanterbury, Kent, UK

Posted 02 January 2015 - 02:54 PM

This is my very first project and I'm trying to make work this shield http://www.adafruit.com/product/1411 with my netduino plus 1 for almost 3 days with not success. I followed all the instructions at the adafruit page on soldering, and so on, but netduino 1 SCL and SDA ports are missing so I need to use the analogic pins4 and 5.

 

It might be worth you having a look at my project on GitHub for Stepper Motor Control. It includes a driver for the Adafruit motor shield, which uses the PCA9685 PWM chip, that I think is the same one they are using on your shield. My code includes a driver for the PCA9685; it is fairly modular and loosely coupled and you would fairly easily be able to extract the PCA9685 code. It relies on the I2C code built into .NetMF of course.

 

Get it via http://tigra-astrono...-microframework

 

Regards,

Tim Long






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.