A DIY handheld Gamepad using ESP32 and Communicates over BLEDesigned by Electro Point in India
Hi there, Thanks for stopping by. If you find my work interesting, then please help my future projects by purchasing some of the items from my store. It'd be very helpful.
What is it? This is a DIY handheld gamepad, made using ESP32 microcontroller. You might have seen such game controllers before. But most of them use Arduino. Or more specifically Arduino pro micro or…Read More…
This is a DIY handheld gamepad, made using ESP32 microcontroller. You might have seen such game controllers before. But most of them use Arduino. Or more specifically Arduino pro micro or Leonardo board. Because these boards support HID, or human interface devices over USB. but esp32 doesn't have such feature. So how do we do it? Well, esp32 does have BLE, or Bluetooth low energy, which we can use to communicate wirelessly, over Bluetooth.
So we have ESP32 module, as the central controller, then we have the USB type-C port, and a 3.3v regulator to convert 5v to 3.3v. Then we have the programming circuit, using ch340c usb to serial converter with auto programming mode and auto reset circuitry using duel transistors. We also have a battery charging circuit, along with overcharge, and over discharge protection. Which then boost up to 5v, using the boost converter ic. Next we have the joysticks, D-Pad buttons, trigger buttons, Neopixel LEDs, i2c port. And finally a 3way switch, to toggle between USB power and battery power.
The gamepad has
It can run using 2 18650 Li ion cells, which can be changed using the USB type-C port. And it can also be used to program the microcontroller. The design is inspired by the new ps5 controller, to give it a better look. The GPIO4 is connected to the battery using a voltage divider. So that we can measure the battery voltage. the NeoPixel LEDs will indicates if the controller is connected to a device or battery voltage is low.
The code is based on BLE Gamepad library by lemmingDev. In the code I have defined all the GPIO pins for different inputs. Then in the setup there are some initial led animations. And as soon as the board is connected to the device, all LEDs will turn Green. And it will check battery voltage, in a time interval, which is defined earlier. Then we get the button states, and set the gamepad buttons accordingly. Then we take the analog inputs, and map it to suitable values. And finally set the axis according to the values we received. After uploading the code open Bluetooth menu on your Smartphone or PC and you will see a new device pops up. click on that to connect it and you are ready to play.
No country selected, please select your country to see shipping options.
No rates are available for shipping to .
Enter your email address if you'd like to be notified when ESP32 BLE GamePad can be shipped to you:
Thanks! We'll let you know when the seller adds shipping rates for your country.
|Shipping Rate||Tracked||Ships From||First Item||Additional Items|
We recognize our top users by making them a Tindarian. Tindarians have access to secret & unreleased features.
We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. The only way to become a Tindarian is by being a nice & active member of the Tindie community!