|
For extremely simple skid (tank-like) steering and two joysticks, you'd use the joystick values for p1_y and p2_y (changes depending on which ports the joysticks are connected to, so there's also p3_y and p4_y) for input. I think by default they're already read in, so you don't need to deal with that. But don't forget to adjust values because of the different orientation of wheels on opposite sides.
Then look at the very bottom line of the default code for a SEROUT command (convenient example located above it), and substitute p1_y and p2_y for the corresponding PWMs your motors are plugged into.
I'd suggest also putting in a snippet of code (at least temporarily) to kill the motors when the trigger is being held down in case something goes haywire.
Last edited by Mongoose : 02-01-2003 at 00:52.
|