This project implements a one-handed controller using an ESP32, a joystick, buttons, and an IMU (Inertial Measurement Unit). The controller is designed to work as a Bluetooth gamepad, using the ESP32 BLE capabilities.
Adafruit_BNO055
Adafruit_Sensor
imumaths
ESP32-BLE-Gamepad
git clone https://github.com/Yato-tech/OneHand-Controller.git
Power on the ESP32. The device will start in Bluetooth mode and will be discoverable as a gamepad. Connect to the gamepad from your PC, smartphone, or any compatible device. Use the joystick to control the X and Y axes. The IMU sensor will control additional axes (Yaw, Pitch, and Roll). The buttons can be used to simulate gamepad buttons.
MyProject.ino: The main entry point of the project. Initializes all components and handles the main loop. Joystick.h/cpp: Handles the joystick inputs and converts them into gamepad axis values. IMU.h/cpp: Manages the IMU sensor data (Yaw, Pitch, Roll) and converts it into usable gamepad axis values. Button.h/cpp: Handles button inputs. BLEManager.h/cpp: Manages Bluetooth communication and sets up the BLE Gamepad.
IMU Not Detected: Ensure that the BNO055 IMU is connected correctly via I2C. Check the wiring for any loose connections. Bluetooth Connection Issues: Make sure that the ESP32 is properly configured for BLE. If you're having trouble pairing, try resetting the device or clearing the Bluetooth cache on your phone/PC. Joystick/Buttons Not Responding: Verify that all GPIO pins are correctly assigned and wired. Ensure that the ESP32 is receiving analog inputs from the joystick. Contributing Feel free to open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.