View Single Post
  #1   Spotlight this post!  
Unread 21-02-2010, 05:46
sp33chy sp33chy is offline
Registered User
FRC #3332
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Melbourne, FL
Posts: 29
sp33chy is an unknown quantity at this point
Servos not working

Yeah. As a last minute thing I am adding moving camera view. However the servo motor isn't working. Neither of the ones that I opened today work so I don't think it's hardware related. So I start off by making a Servo...

Servo beatrice = new Servo(4,10);
double beatricex; //double for angle

Digital module is in slot 4, with servo attached to PWM slot 10.

Then during teleop's loop, I have this:

if (rightjs.getRawButton(4)){
beatricex--;
}
if (rightjs.getRawButton(5)){
beatricex++;
}
beatrice.setAngle(beatricex);

Pressing the buttons does nothing. I have tried several variations, such as setting it with a constant in the code, using set instead of setAngle, and using an axis on the joystick. Nothing works. I'm thinking something stupid is being done by me and I'm just too blind and sleep-deprived to see it.
Reply With Quote