Finally I found the required code to use Toggle Switches as a HID (Human Interface Device) so I can connect them to ETS2 (or any other Sim).
I used 10K ohm "PULL-UP" Resistors to get clean code for Arduino. Press a button ON sends one letter of choice, pressing it again sends one letter of choice (could be anything you like).
I also put an example in there where a button presses "left-shift+a". I figured out its easier to assign new keys/functions in some Simulators when you use "left-shift+letter" . Remember most letter are already occupied in most Sims so that's why I put in an example of "left-shift+a".
I recommend to use a "Pro Micro" just like I did. Please note my code is or might NOT be compatible with an UNO / MEGA or DUE and might need modification for the Arduino LEONARDO!
Downloads:
.INO File for Arduino IDE (Sparkfun Pro Micro)
.FZZ File for Fritzing (Wiring Diagram Sparkfun Pro Micro as HID+Debounce)
Useful link I found:
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.