1 GitHub - Hyperx837/realworld-asphalt8: an arduino+pyfirmata app that works like a 🎮 physical game machine for asphalt8 🏎️ · GitHub
Skip to content

Hyperx837/realworld-asphalt8

Repository files navigation

Real World - Asphalt8

real world asphalt (RWA in short) is a physical controller for Asphalt8 (by changing keys can be used in other games). Since python can't directly communicate with arduino firmata is used as a bridge. following are some demos of the project.

front

side



How it works?

there are two buttons under each paddle that you see in the image. there is another button close to the right hand in the steering wheel. and steering wheel is attached to a potentiometer. when a button is pressed the program identifies the signal and then presses the key accordingly. when steering wheel is turned program identifies whether it's center, left or right according to the tilt. all the keys can be pressed parallely. here are the buttons and the keys supposed to be pressed.

Buttons

  • Accelerator Button (right paddle) - w
  • Brake Button (left paddle) - s
  • Nitro Button (Steer Wheel) - space

Steer Wheel

  • Straight - Nothing
  • Left - a
  • Right - d

Prerequisites

  • Python 3.7 or later
  • poetry (optinal)
  • an arduino
  • 3 buttons (script will run without buttons)
  • Arduino IDE (btw if we call it an IDE vim is an OS)

Getting started

Install arduino IDE from www.arduino.cc and install it.

upload the Standardfirmata sketch to the arduino from firmata library.

first clone the project cd into it

git clone https://github.com/Anu2001dev/realworld-asphalt8
cd realworl-asphalt8

installs deps. you can install via pip but poetry is recommended for maintainability

pip

pip installl -r requirements.txt

poetry

poetry install

finally

python main.py

Built With

Builders

  • Me - Code
  • Visal Ranindu - All the mechanical work (Although he doesn't know any coding he is a great engineer)

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

an arduino+pyfirmata app that works like a 🎮 physical game machine for asphalt8 🏎️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages