View Single Post
  #1   Spotlight this post!  
Unread 14-02-2008, 19:40
programmr's Avatar
programmr programmr is offline
Registered User
AKA: Face
FRC #0522
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Staten Island, NY
Posts: 83
programmr is a jewel in the roughprogrammr is a jewel in the roughprogrammr is a jewel in the rough
Send a message via AIM to programmr
Exclamation Help again with Servo Programming

Hello, this is what i came up with for shifting with a servo... It doesnt seem to work and was wondering if anyone knew how to do it. If p1_sw_top button is hit, it shifts pwm15 and pwm16 into high gear (255) if the p1_sw_trig is hit, it needs to shift into low gear (0). How can i make this work? PLEASE HELP!!!


if ((p1_sw_top == 1)) // If Top Button on Joystick 1 is hit
{ // Make the two servos.......
pwm15 = 255;
pwm16 = 255;
}
else
{
pwm15 = 255;
pwm16 = 255;
}
if ((p1_sw_trig == 1)) // If Trigger is pushed on Joystick 1
{ // Make the two servos.......
pwm15 = 0;
pwm16 = 0;
}
else
{
pwm15 = 0;
pwm16 = 0;
}