|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Help with code single joystick
The default code for single joy stick drive is
pwm01 = Limit_Mix(2000 + p1_y + p1_x - 127); pwm02 = Limit_Mix(2000 + p1_y - p1_x + 127); however with this code our robot turns right when joystick is forward , and goes forward when the joy stick is pushed to the left. Mathematically pwm01 = Limit_Mix(2000 + p1_y + p1_x - 127); pwm02 = 254-Limit_Mix(2000 + p1_y + p1_x - 127); would solve the problem, assuming 254 is the maximum value for the PWM since I dont have the robot with me I can not tell if this will work. Could you please tell me if this will work, if not could you please tell me why or point me in the right direction. Thank you James |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Single joystick control problem | Mr. Van | Programming | 7 | 23-11-2004 09:10 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |
| Changing 1 joystick code to 2 (rookie team) | Brawler006 | Programming | 5 | 20-02-2004 17:00 |
| single joystick programming | Bill Bonsky | OCCRA | 2 | 04-10-2003 09:47 |
| robot goes haywire with the one joystick default code | Miles | Programming | 7 | 24-01-2003 14:58 |