Arduino Uno Game Controller
About the project
A DIY game controller using Arduino Uno
Project info
Items used in this project
Story
I saw some videos about game controllers and I wanted to make one. But I didn't know that I couldn't make them with Arduino UNO until I programmed it. The libraries used (keyboard.h) in those projects allow the 32u4 and SAMD based boards (Leonardo, Esplora, Zero, Due, and MKR Family) to appear as a native Mouse and/or Keyboard to a connected computer, so an Uno(ATmega328p) won't work directly. Hmm, but I know another way to do it that's what I am sharing here.
Making it possibleWhen I didn't know c++ I used to program Arduino using python. While using python the Arduino always transmits and receives data. So I can utilize that to make our USB Gamecontroller. For this project, we also need to install pyfirmata and keyboard(just open a command prompt and type "pip
install
pyfirmata
keyboard
"). Before that, we also need to upload a sketch called standard frimata from Arduino ide to establish serial communication between the PC and the Arduino.
just wire it up
ENCLOSUREI first placed everything on a breadboard and then used cardboard to cover it and added a little flavor to it and placed the Arduino to the back of the cardboard.
1 / 3
Final PartJust connect it to your computer and run the given python code then take a game and start playing voila!!!
SuperTuxKart
SuperTuxKart
If you need further more explanation about the code and other kinds of stuff then try watching this video
full videoFinal OutputFinal output
Leave your feedback...