Gaming Glove
.png)

The gaming glove is a wearable controller featuring an MPU-6050 sensor mounted on top. By tilting your hand along the X-axis and Y-axis, you can trigger keypresses to control games. This project is perfect for playing running games like Subway Surfers, which use the A, S, D, and W keys for movement.
In this build, I've mapped the X-axis to the 'A' and 'D' keys, and the Y-axis to the 'W' and 'S' keys. While this tutorial covers four basic keys, the MPU-6050 sensor is capable of much moreβfeel free to use your creativity to add additional functionality and make it even more fun!
Supplies

- Arduino UNO (or any compatible prototyping board)
- MPU-6050 Module
- Arduino Programming Cable
- Glove
- Wires
Connect the MPU-6050 Module to Arduino

Connect the Arduino UNO to the MPU-6050 sensor according to the wiring diagram shown in the image:
- VCC β 5V
- GND β GND
- SCL β A5
- SDA β A4
Ensure all connections are secure before proceeding to the next step.
Upload Code to Arduino
Upload the following code to your Arduino using the Arduino IDE:
Convert Arduino Into an HID Device

The Arduino UNO and Nano boards cannot use the 'Keyboard' library natively for keypress actions because they lack the necessary USB HID capabilities. To enable this functionality, you need to flash the Arduino with modified firmware to convert it into an HID (Human Interface Device).
Instructions:
I've found a helpful YouTube tutorial that walks you through the firmware flashing process. You can follow it here.
Important: This process will temporarily change your Arduino's firmware. You can revert it back to the original firmware later if needed.
Install Subway Surfers or Any Runner Game


Install Subway Surfers or any runner game on your PC, or play it directly in your web browser from here.
Note: Make sure to bind the A, S, W, and D keys to the game's movement controls if they aren't already configured.
Gaming Glove Is Ready to Use!


Congratulations! Your gaming glove is now complete and ready for action.
How to Use:
- Wear the glove with the MPU-6050 sensor securely attached
- Connect the Arduino to your computer via USB
- Launch your game
- Tilt your hand to control your character:
- Tilt left β Move left (A key)
- Tilt right β Move right (D key)
- Tilt forward β Move forward (W key)
- Tilt backward β Move backward (S key)
Enjoy playing with your custom-built gaming glove!
Conclusion
This project demonstrates how you can create a motion-controlled gaming interface using simple, affordable components. The MPU-6050 sensor opens up many possibilities for gesture-based controls, and this basic four-key setup is just the beginning.
Future Improvements:
- Add more keys for additional game actions
- Incorporate buttons for jump or special moves
- Create a wireless version using Bluetooth
- Add LED indicators for visual feedback
- Calibrate sensitivity for different hand sizes
Feel free to experiment and share your modifications. Happy gaming!