this script (and a firmware reflashing) allows you to use an arduino uno r3 with a joystick and two buttons as a keyboard/controller
Find a file
2026-01-02 15:00:47 +01:00
controller.ino dropping in controller.ino from my repo 2026-01-02 14:55:52 +01:00
README.md some edits to the readme to explain the firmware flashing part 2026-01-02 15:00:47 +01:00

arduino-uno-r3-as-keyboard

this script (and a firmware reflashing) allows you to use an arduino uno r3 with a joystick and two buttons as a keyboard/controller

the firmware part

so first you grab your firmwares from https://github.com/robinplantey/arduino-hid-keyboard

when testing, after uploading your code (usually as root):

dfu-programmer atmega16u2 erase
dfu-programmer atmega16u2 flash --debug 1 Arduino-keyboard-0.3.hex
dfu-programmer atmega16u2 reset

then you powercycle

when editing, or to reset firmware,

dfu-programmer atmega16u2 erase
dfu-programmer atmega16u2 flash --debug 1 Arduino-usbserial-atmega16u2-Uno-Rev3.hex
dfu-programmer atmega16u2 reset

also because my pc is stupid i usually have to chmod 777 /dev/ttyACM0 before uploading but if you can already upload programs to it you're fine lol