Coder Social home page Coder Social logo

dineshvyas / movementgamecontroller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cole-thompson/movementgamecontroller

0.0 1.0 0.0 6.38 MB

Wireless movement based game controller. Interfaces a joystick, buttons, 9 DOF IMU, and an ESP8266 WiFi MCU dev board. Programmed with Arduino.

C++ 100.00%

movementgamecontroller's Introduction

MovementGameController

Wireless movement based game controller.
Interfaces a joystick, buttons, 9 DOF IMU, and an ESP8266 WiFi MCU dev board.
Programmed with Arduino WiFi and I2C Libraries.

About

This is a part of a final project design competition for an Embedded Systems Design Lab. There were other parts to the project, including a console and display that ran a 2P fighting game. This is one part, the game controller, that I programmed, designed the circuit layout, and 3d printed parts for.
The controller uses Madgewick's IMU Algorithm to compute rotational quaternions from the IMU data, and does some simple vector rotation to determine direction of acceleration for the gestures that happened in between transmissions. The directions on the movement gestures need some work, I'm hoping to come back to this project and maybe just use the Espressif ESP IDF.

UDP Packet

Sends a packet in this format over UDP every 20ms:
{D:idnum:q0,q1,q2,q3:x_gesture,y_gesture,z_gesture:y_rot:x_js,y_js:b_primary,b_js,b_3}
Controller id, rotational quaternions, gesture vectors, y rotation (this could have been computed from the quaternions, but y-rot was significant to the game), joystick data, button data.

Parts (links on the way)

ESP8266 12E Makerfocus Dev Board
MPU9255 10DOF IMU - Gyroscope, Accelerometer, Compass
Joystick - 2 axis, potentiometers. There was one ADC so took turns sampling each one.
Large button with built in LED
Small push button
Small ~500mAh PulsePak microusb battery pack

Controller

Controller

Circuit Diagram (better one on the way)

Circuit Drawings

movementgamecontroller's People

Contributors

cole-thompson avatar

Watchers

James Cloos 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.