Needing some remote to control my spy
rover, I built this joystick which controls the vehicle
via Bluetooth. The motor topped by a touch sensor form the joystick
arm, providing an ergonomic grip.
Motor encoders are used to read the
position of the joystick. These values are sent
to the controlled device through Bluetooth. A message
is also sent to the remote device when the trigger
button is pressed.
The trigger button is also used at
the beginning of the program to calibrate the joystick
(set the zero position).
It might also be used as a "shift key",
to control two actions when the trigger is released,
two other actions when pressed.
Both motors are directly coupled
to the joystick arm, this increases precision by
avoiding looseness (though some gear backlash inside
the motors can't be avoided)
These programs send the joystick position to a remotely controlled
- Start the remote program
on the remote NXT.
- Establish Bluetooth link between both NXTs from the
joystick (the link must be established from joystick, using
slot 1 to use the programs without modifications)
- Start the joystick program
- Center the joystick
- Press trigger button
- You are now controlling the remote robot.
Bluetooth mailbox usage:
- Forward/Backward joystick value is sent as a signed
value in mailbox 1
- Left/Right is sent as a signed value in mailbox 2
- Trigger button sends a message in mailbox 3