Straberrie
02-01-2009, 13:18
Hey all,
Servo panservo(1);
float servoRange = panservo.GetMaxAngle() - panservo.GetMinAngle();
for(float angle = panservo.GetMinAngle();
angle < panservo.GetMaxAngle();
angle += servoRange / 10.0)
{
panservo.SetAngle(angle);
Wait(.1);
}
We have a servo plugged into PWM channel 1 on the primary sidecar module, and have this code in the autonomous function but the servo ceases to move. The code is mostly directly out of the programming guide, except for changing the channel number to match our setup. Any ideas/suggestions?
Thanks!
Servo panservo(1);
float servoRange = panservo.GetMaxAngle() - panservo.GetMinAngle();
for(float angle = panservo.GetMinAngle();
angle < panservo.GetMaxAngle();
angle += servoRange / 10.0)
{
panservo.SetAngle(angle);
Wait(.1);
}
We have a servo plugged into PWM channel 1 on the primary sidecar module, and have this code in the autonomous function but the servo ceases to move. The code is mostly directly out of the programming guide, except for changing the channel number to match our setup. Any ideas/suggestions?
Thanks!