Thanks...
/***************************************************************
Control of the servos on the UAS
***************************************************************/
#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>
// called this way, it uses the default address 0x40
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();
// Depending on your servo make, the pulse width min and max may vary, you
// want these to be as small/large as possible without hitting the hard stop
// for max range. You'll have to tweak them as necessary to match the servos you
// have!
#define SERVOMIN 200 // this is the 'minimum' pulse length count (out of 4096)
#define SERVOMAX 300 // this is the 'maximum' pulse length count (out of 4096)
// our servo # counter
uint8_t servonum = 0;
uint8_t servo1 = 0;
void setup() {
Serial.begin(9600);
delay(3000);
Serial.println("16 channel Servo test!");
pwm.begin();
pwm.setPWMFreq(60); // Analog servos run at ~60 Hz updates
}
void loop()
{
pwm.setPWM(0,0,225);
delay(2000); // two seconds
pwm.setPWM(0,0,475);
return;
}