A Joystick "keyboard" for Classic Video Game Controllers
Channel: ethertubes
Date: 07/02/2018

I made an adapter to take classic video game controllers for Sega, Atari (2600, 7800) and Commodore and adapt them to work as a 5 button USB keyboard (4 directions and a fire/trigger key).  The joystick now works like an external numeric keypad.  Pressing the fire/trigger button will act like pressing the right-hand Control/Ctrl key.  This was all written in the Arduino IDE, and can be easily changed (if for example you prefer using W,A,S,D for direction and space bar to fire, or the arrow keys for movement, it's a quick change to make.

For source code and full write-up see my blog:
https://ethertubes.com/joykey/

I used parts available on Amazon.com:
an Arduino Pro Micro-like board
https://www.amazon.com/OSOYOO-ATmega32U4-arduino-Leonardo-ATmega328

"DB9" / DE-9 9 pin adapter module (which I removed the terminal blocks from)
https://www.amazon.com/gp/product/B00YM3W7OI

And a Micro USB cable
https://www.amazon.com/gp/product/B003YKX6WM

To find the numeric keyboard directional key values I referenced the USB HID Usage Tables found here:
http://www.usb.org/developers/hidpage/Hut1_12v2.pdf