Giter VIP home page Giter VIP logo

camarogamepad's Introduction

2012 CAMARO as an XBOX gamepad

What is it

I am compiling here the documentation to create a device that allows using a 2012 Camaro as a game controller.

Important: This is an experiment, there is no guarantee that it will work or that it will not cause damage to the car or other equipment.

Result

(Click on the image)
2012 Camaro as a controller for VR simracing

Hardware used

Wiring

image
Sparkfun Arduino pro micro hookup guide

image

Software

  1. Install Arduino IDE
  2. Add the sparkfun Arduino pro micro board
  3. Install the libraries dependencies (from the libraries manager): ArduinoXInput, Arduino-MCP2515
  4. Important: Follow the instructions and install the XInput boards from the ArduinoXInput library.
    (Failure to follow these instructions will result in the device not functioning and potentially bricking your Arduino board.)
  5. Flash the CamaroGamePad.ino sketch to the arduino

CAN reverse engineering

Hardware setup

  • ESP32-DevkitC board
  • The same MCP2515 breakout board as before
    • with SPI pin 5 (CS) and pin 21 (INT)
    • with OBD2 pin 6 (CAN-H) and pin 14 (CAN-L)

Software Setup

  • Flash the ESP32 board with the canhacker.ino sketch
  • SavvyCan with custom build (See collin80/SavvyCAN#764)
  • Configure a new connection :
    • LAWICEL
    • Serial Port Speed : 2000000
    • CAN Bus Speed : 500000

CAN ID

For now, here's what I've found (CAMARO 2012):

Brake:

  • CAN id: 0x0BE
  • Index: 1
  • Size: 1 byte
  • Value: [0-255]
  • Unit: %

Accelerator:

  • CAN id : 0x1A1
  • Index: 6
  • Size: 1 byte
  • Value: [0-255]
  • Unit: %

Steering wheel:

  • CAN id : 0x1E5
  • Index: 5,6
  • Size: 2 bytes
  • Value: [-9000:9000]
  • Unit: degrees * 10

If you've identified any other useful IDs, let me know.

Some reading

camarogamepad's People

Contributors

psykokwak-com 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.