2 motors controlled by one joystick

HazardsMind:
deadzone is needed because your pot will almost never perfectly be centered at 512, so some slack is needed

For many (most? all?) of the PS2 style thumbsticks - they have a "built-in" deadzone around the center of the stick (in some cases I have heard it is quite large - almost to the point of making the stick unusable). Just something to keep in mind; it should be possible to figure out what the size of the zone is with some test code.

Alternatively, if you have a display available (serial or maybe an LCD) - you could create a "calibration code" section for the thumbstick like the old PC games used that would instruct you to push the stick up to one corner, push it down to the opposite corner, perhaps move it around in a circle, then center it - at each step instructing you to "press a button" (and don't make this the "stick button" that many of these units have - as that could throw off the reading - though with the deadzone it may be ok - eh, play with it). It might even be possible to do the calibration with an LED and some "intelligent" code (and/or a buzzer or something?).

1 Like