Adafruit 16-Channel 12-bit PWM/Servo Driver Help

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ksmith478
 
Posts: 1
Joined: Wed Apr 02, 2014 11:01 pm

Adafruit 16-Channel 12-bit PWM/Servo Driver Help

Post by ksmith478 »

Hello All!

I am currently working on a project with a Raspberry Pi and am trying to use a Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface - PCA9685. I am attempting to write a program in C to allow me to control a few servos that I have connected to the controller. From what I can tell I would establish connection using the address (say 0x40) => send another byte of data to indicate what register I wish to write to on the actual device (say 0x06 for LED0_ON_L) => then write a value (0x123). This should set the on low register to 0x12 and the high register to 0x03 correct? Assuming this is correct then I would simply need to repeat the process with the LED0_OFF_L and LED0_OFF_H registers and theoretically my servo should move?

What am I missing here because this will not move the servo. I have checked to make sure that everything is connected the way it is supposed to be.

User avatar
adafruit_support_bill
 
Posts: 88091
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit 16-Channel 12-bit PWM/Servo Driver Help

Post by adafruit_support_bill »

We have a library for this on the Pi. That would be the best reference for how to control servos: http://learn.adafruit.com/adafruit-16-c ... it-library

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”