Build your own Wireless Controller
You can build a basic wireless game controller using the ATmega32u4 Pro Micro development board by combining it with a wireless module (like Bluetooth or RF) and connecting input components like buttons, joysticks, etc.
Here's a step-by-step overview to build a DIY wireless controller using the ATmega32u4 + HC-05 Bluetooth module, targeting use with PC or Android, not Xbox.
What You’ll Build
A Bluetooth HID game controller that can wirelessly connect to:
-
PCs (Windows/Linux)
-
Android phones/tablets
-
Raspberry Pi
This setup does not work on Xbox, but it’s great for emulators, custom game rigs, or robotics control.
Components Needed
| Component | Description |
|---|---|
| ATmega32u4 Pro Micro | Microcontroller with native USB HID support |
| HC-05 Bluetooth Module | For serial Bluetooth communication |
| Buttons & Joysticks | For input |
| Battery Pack (3.7V Li-ion or AA) | For portable power |
| Level Shifter / Resistors | For 3.3V ↔ 5V communication (optional) |
| Wires, Breadboard, or Custom PCB | For connections |
High-Level Steps
1. Design the Inputs
Decide on your control scheme:
-
4 or more buttons
-
1 or 2 analog joysticks (using potentiometers or thumbsticks)
-
Optional: D-pad, triggers, etc.
Connect buttons to digital pins, and joysticks to analog pins (A0–A5).
2. Connect the HC-05 Module
The HC-05 is a serial Bluetooth module that communicates with the ATmega32u4 using UART (TX/RX).
Wiring:
| HC-05 Pin | Connect To |
|---|---|
| VCC | 5V (or 3.3V if it's a 3.3V module) |
| GND | GND |
| TX | RX (pin 0 on Pro Micro) |
| RX | TX (pin 1 on Pro Micro) (use a voltage divider! HC-05 is 3.3V) |
Use a resistor divider on the TX line from Pro Micro → HC-05 RX (5V → 3.3V).
3. Program the ATmega32u4
You’ll be sending input data over Bluetooth serial. Here’s a basic sketch:
You can read multiple buttons, map analog ranges to 0–255, and format output as JSON or CSV for easy parsing.
4. Pair the HC-05 with a PC or Android
-
Power the controller.
-
Go to your Bluetooth settings.
-
Pair with the HC-05 (default PIN:
1234or0000). -
Open a serial terminal (like PuTTY or an emulator input handler) to receive data.
On Android, use apps like Bluetooth Serial Controller or Gamepad Tester.
5. Turn Into a Real Gamepad (Optional Advanced Step)
To emulate a Bluetooth HID gamepad, you cannot use HC-05 directly, as it only supports Serial Port Profile (SPP).
For real HID gamepad emulation, you’d need:
-
Bluetooth module with HID support, like Bluefruit EZ-Key or RN-42 HID firmware
-
Or switch to a board like ESP32, which supports Bluetooth HID natively.
But for PC games that support remapping or for robot control, Serial over Bluetooth is usually enough.
Powering the Controller
You can use:
-
3.7V Li-ion/LiPo battery + boost converter (to get 5V)
-
2x AA batteries (3V total, may work directly with Pro Micro + HC-05)
-
Rechargeable USB pack (if size isn’t a constraint)
Purchase the Leonardo Pro-Micro ATMega32U4 here....