|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Servo Programming Again.....
i have a question about servos used for shifting...... This si the code i came up with and i need some verification.... will the servo stay in the position if the top switch is hit will it stay at 255? what if the trigger is hit, how can i make it stay at either 255 or 0? DO ALL I NEED TO DO IS CHANGE THE FIRST 2 127'S TO 255 AND THE SECOND 127'S TO 0? I want the servos to stay in the position relating to what button was pushed?
if ((p1_sw_top == 1)) // If Top Button on Joystick 1 is hit { // Make the two servos....... pwm15 = 255; pwm16 = 255; } else { pwm15 = 127; pwm16 = 127; } if ((p1_sw_trig == 1)) // If Trigger is pushed on Joystick 1 { // Make the two servos....... pwm15 = 0; pwm16 = 0; } else { pwm15 = 127; pwm16 = 127; } Any help would be appreciated. Thank You |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Programming in Python and Explaination of Programming | roboxking | Programming | 22 | 07-01-2008 16:08 |
| HS-322D servo programming question | JimHull | Programming | 12 | 10-02-2007 15:14 |
| programming motors with programming kit | BorisTheBlade | FIRST Tech Challenge | 4 | 01-11-2005 19:03 |
| Servo behavior question / advanced servo/PIC programming question | DanL | Electrical | 12 | 18-10-2005 18:33 |
| Servo | MASherry | General Forum | 6 | 04-10-2004 22:46 |