Transform your gaming experience with our DIY Motion Based Game Controller, utilizing the precision of the MPU6050 gyroscope and the versatility of an Arduino Pro Micro. This repository guides you through creating your own affordable and customizable game controller that connects seamlessly as a USB joystick to Linux, Mac, and Windows systems.
- 🛠️ DIY friendly: Assemble in under 1 hour with no soldering required for basic setup.
- 💰 Cost-effective: Build your controller for approximately €5.
- 🎮 Plug-and-play: Recognized as a generic joystick on multiple operating systems.
- 🔄 Customizable mapping: Configure sensor data to joystick movements to suit your play style.
- 🕹️ Giant Joystick: Check out the
GiantJoystick
branch for an enlarged controller experience. - 🏄 Balance Board Joystick: Visit the
BalanceBoard-Xinput
branch for balance board integration.
- Gather the hardware: Arduino Pro Micro, MPU6050 sensor, breadboard, optional push buttons, and wires.
- Assemble the hardware: Simple breadboard setup with minimal wiring.
- Prepare the software: Install Arduino IDE, required libraries, and example sketches from this repo.
- Upload and play: Flash your Arduino, plug in the controller, and enjoy your games with a new level of interaction.
- Step-by-step building guide
- Software installation walkthrough
- Troubleshooting tips for common setup issues
- Configuration examples for joystick-to-key mapping
Ready to level up your gaming? Dive into the Motion Based Game Controller project now!
An easy-to-build DIY game controller for computers, based on the MPU6050 gyroscope & Arduino Pro Micro.
🎮
For the Giant Joystick use the Branch GiantJoystick
: https://github.com/playAbilityTech/Motion-Gamepad/tree/GiantJoystick
For the Balance board joystick use the Branch BalanceBoard-Xinput
: https://github.com/playAbilityTech/Motion-Gamepad/tree/BalanceBoard-Xinput
The IMU-Joystick is assembled in less than 15 minutes and costs about €5. When connected to a computer, the board presents itself as a USB joystick. Using the MPU6050, the Arduino measures acceleration & rotation data and maps it to joystick behaviour. The precise mapping of sensor data to joystick axes/buttons can be configured in the Arduino sketch. The controller is automatically detected as a generic joystick device on Linux, Mac, and Windows, without further software:
You can put together your own IMU-Joystick in about 1-2h. Except for mounting pin headers, no soldering is required.
- Arduino(-compatible) Pro Micro, any ATmega32U4-based Arduino will do.
- MPU6050 (GY-521 breakout), a low-cost accelerometer + gyroscope.
- mini-sized breadboard
- (optional) push buttons
- some wire to make breadboard connections.
Solder pin headers where needed; Place Pro Micro, GY-521 & wire on breadboard as follows:
Note that Pro Micro 8 & 9 do not need to connect to the MPU6050.- Arduino IDE (>=1.6.6)
- external Arduino libraries:
-
i2cdevlib collection (at least I2Cdev and MPU6050).
Follow the installation instructions on the website, or copy the folders
i2cdevlib/Arduino/I2Cdev
andi2cdevlib/Arduino/MPU6050
from the project repository into your Arduino libraries directory (~/Arduino/libraries/
on Linux). -
ArduinoJoystickLibrary (>=2.0)
Copy the folder
ArduinoJoystickLibrary/Joystick
to your Arduino libraries directory.
-
- This repository. Copy any folder from
examples
into your Arduino directory.
Install the required libraries and upload the one of the example sketches to your Pro Micro board. Note that you might need to select Arduino Leonardo as a target board, when using the Arduino GUI.
Plug the USB directly on the computer. (avoid USB Hub).
- Go to
Settings
->Devices
Devices and Printers
inside thePrinters and Scanners
tab- Right click on the controller ->
Game controller settings
- click on the
Properties
button
-
Download AntiMicro Software https://github.com/AntiMicro/antimicro/releases
-
Set the Axis 2 to UP | DOWN key or see this example profil
pin 7 -> button 3 (onboard)
pin 15 -> button 4 (connector 1 green) pin 14 -> button 5 (connector 1 blue) pin 16 -> button 6 (connector 2 green) pin 10 -> button 7 (connector 2 blue)
- Keep wire short Between MPU and Arduino (may cause issue if wire are to long)
- Avoid hub USB
- Install external Arduino libraries:
-
i2cdevlib collection (at least I2Cdev and MPU6050).
Follow the installation instructions on the website, or copy the folders
i2cdevlib/Arduino/I2Cdev
andi2cdevlib/Arduino/MPU6050
from the project repository into your Arduino libraries directory (~/Arduino/libraries/
on Linux). -
ArduinoJoystickLibrary (>=2.0)
Copy the folder
ArduinoJoystickLibrary/Joystick
to your Arduino libraries directory.
- Upload the software (select Arduino Leonardo as a target board)