Git Product home page Git Product logo

realworld-asphalt8's Introduction

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

realworld-asphalt8's People

Contributors

hyperx837 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.