(I made this to work with asphalt 8) How you control it is:
Left and Right buttons for steering.
Middle button for nitro
AlgorithmFirst lets see how a real game controller works. It sends a keystroke to the computer which it is connected and the game responds. Since the Arduino Uno can't send a keystroke by itself we will print it in the serial monitor when a button is clicked and another program will convert it to keystrokes. To make this program I am going to use Python. You can use whichever programming language you wish to use.
BuildNow follow the wiring below.
Now copy the Arduino and Python code from below.
After you upload the code to the Arduino and run the python file (You will have to install the serial and pynput libraries). Type the com port you are using. Then it test it in Asphalt 8 or something else. I used it because the buttons wiring are crowded enough and I didn't want to make another button for acceleration, so I used Asphalt 8 (I could not get 9) because it had auto acceleration.
Finished!Enjoy racing with your new game controller!
If you know Python then you can modify the code and Arduino code and make a real game controller for other games too (I don't want to because I like to play racing games only).
Thank You
Comments
Please log in or sign up to comment.