|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#7
|
|||||
|
|||||
|
Re: Create a low speed drive in programming
The wheel that John is talking about was on the old joysticks. It was a thumb wheel located opposite the y axis trim adjustment wheel. The input was analog and reffered to in the code with a variable name similar to "thumb_wheel."
Here's the code to have the thumb wheel control the scaling on a joystick input. Code:
if (joystick < 127) {
motor = 127 - ((127 - joystick) * (thumb_wheel/254));
} else if (joystick > 127) {
motor = 127 + ((joystick - 127) * (thumb_wheel/254));
}
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| what's your most important drive train advice? | Ken Leung | Technical Discussion | 42 | 07-01-2003 09:58 |
| Power, speed, and torque... AGH | Gui Cavalcanti | Technical Discussion | 5 | 10-11-2002 19:02 |
| Quad- 1/2 track drive system | Ben Mitchell | Technical Discussion | 24 | 30-01-2002 11:55 |
| "Motors and Drive train edition" of Fresh From the Forum | Ken Leung | CD Forum Support | 6 | 29-01-2002 12:32 |
| Drivetrain Help | Jordan | Technical Discussion | 16 | 02-12-2001 12:14 |