Items used in this project
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 possible
When 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 "
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
I 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
Just connect it to your computer and run the given python code then take a game and start playing voila!!!
If you need further more explanation about the code and other kinds of stuff then try watching this videofull videoFinal OutputFinal output