Thread: Servos??? *C++*
View Single Post
  #1   Spotlight this post!  
Unread 02-01-2009, 13:18
Straberrie's Avatar
Straberrie Straberrie is offline
The Plague
AKA: Rebecca
FRC #0375 (Robotic Plague)
Team Role: Programmer
 
Join Date: Feb 2008
Rookie Year: 2007
Location: New York
Posts: 59
Straberrie will become famous soon enough
Servos??? *C++*

Hey all,

Code:
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!
__________________
Team 375: The Robotic Plague
Current Robot: I-Chihuahua
Last Event: Big Apple Breakaway