The Joystick mod allows you to mount a joystick on the top of the gearbox that will act as both a joystick, and a mouse! The joystick is mounted on the port provided for the pedals. It is therefore impossible to use this mod with the pedals.
Pressing the joystick is equivalent to a left click. Holding it down for a long time switches the mouse mod to the joystick mod (directional arrows) and vice versa.
Summary
1) Shopping list
- a joystick (Aliexpress)
- DIN912 : 4xM3x8
- Wires (already present in the main shopping list)
- Dupont connectors
2) Wiring
The joystick is wired to the pedal port on the PCB :
Joystick | PCB | Arduino |
X | Throttle | A0 |
Y | Brake | A1 |
SW | Clutch | A2 |
GND | GND | GND |
5V | 5V | 5V |
3) 3D files
The files are on the google Drive.
4) The code
The mod requires at least the 2.52 code.
Just replace :
//#define SRTMOUSE
by :
#define SRTMOUSE
Be careful, as soon as the mod is activated, the joystick behaves like a mouse. If there is a problem on the assembly, you may have difficulties to use your mouse (cursor systematically goes to the left for example). Engaging the sixth gear disable the mouse behaviour, so if anything goes wrong, engage the 6th.
Hi Lebois, is it a typo in Section 4? Should I “uncomment” that “define SRTMOUSE” statement? Thanks?
—- QUOTE ————–
Just replace :
//#define SRTMOUSE
by :
//#define SRTMOUSE
—- END QUOTE ————-
Yes 🙂
Fixed
Hi Lebois, my friend downloaded the latest rc12 to try adding joystick. But when he enabled him joystick then the 6-button panel disabled. He got this message when troubleshooting the issue. May I ask if there is any tweak required to enable button/joystick/eClutch on a single unit without exceeding the memory usage? Thanks a lot. (he has not use pedals).
Hi Lebois, my friend downloaded the latest rc12 to try adding joystick. But when he enabled him joystick then the 6-button panel disabled. He got this message when troubleshooting the issue.
https://www.arduino.cc/en/Guide/Troubleshooting#size
May I ask if there is any settings adjustment/ tweak required to enable button/joystick/eClutch on a single unit without exceeding the memory usage? Thanks a lot. (he confirmed that he has not use pedals).
I alwyas use those three mods. Please come on discord and share the code