Uploaded June 2026 | Updated September 2026, 3 weeks ago
Build an *STM32 USB HID Gamepad* that allows your STM32 to work as a real game controller on a PC, using an analog joystick and USB HID without requiring custom drivers.
In this tutorial, we configure the STM32 as a *USB HID gamepad* using STM32CubeMX and STM32CubeIDE. We modify the HID report descriptor, connect an analog joystick, read its X and Y axes using ADC with DMA, and send the joystick data to the computer through USB.
We also add a joystick button and create the complete 3-byte HID report containing the X axis, Y axis, and button state. Finally, we test the STM32 gamepad using a gamepad tester and a retro game emulator, showing how Windows, macOS, and modern browsers can recognize it as a standard game controller without any custom drivers.
#STM32 #USB #USBHID #EmbeddedSystems
📁 *Download Project Files & Full Article:* controllerstech.com/stm32-usb-hid-gamepad
📁 *STM32 USB Series:* controllerstech.com/stm32-hal/peripherals/usb-tutorials
📁 *ControllersTech Home:* controllerstech.com
### ▶︎ Related Videos
1️⃣ *STM32 USB CDC Virtual COM Port:* youtu.be/O4o-ed5veh4
2️⃣ *STM32 USB HID Device: Mouse/Keyboard:* youtu.be/5SkVv5UY8cw
3️⃣ *STM32 USB Tutorials Playlist:* youtube.com/playlist?list=PLfIJKC1ud8gj5iYMN53m4H-Gw3tv9FBxO
🔔 *Subscribe for more STM32 and embedded systems tutorials!*
👍 Like and share if this tutorial helped you.
******** SUPPORT US ********
🎁 Donate on Paypal: paypal.me/controllertech
🏆 Become a Member on Patreon: patreon.com/controllerstech/join
🎓 Join Youtube Membership: youtube.com/channel/UCkdqtSMnhYuMsJkyHOxiPZQ/join
🌐 *Connect:*
Facebook: facebook.com/controllerstech
Telegram: https://t.me/controllerstechdiscuss
Instagram: instagram.com/controllerstech
Website: controllerstech.com
Build an *STM32 USB HID Gamepad* that allows your STM32 to work as a real game controller on a PC, using an analog joystick and USB HID without requiring custom drivers.
In this tutorial, we configure the STM32 as a *USB HID gamepad* using STM32CubeMX and STM32CubeIDE. We modify the HID report descriptor, connect an analog joystick, read its X and Y axes using ADC with DMA, and send the joystick data to the computer through USB.
We also add a joystick button and create the complete 3-byte HID report containing the X axis, Y axis, and button state. Finally, we test the STM32 gamepad using a gamepad tester and a retro game emulator, showing how Windows, macOS, and modern browsers can recognize it as a standard game controller without any custom drivers.
#STM32 #USB #USBHID #EmbeddedSystems
📁 *Download Project Files & Full Article:* controllerstech.com/stm32-usb-hid-gamepad
📁 *STM32 USB Series:* controllerstech.com/stm32-hal/peripherals/usb-tutorials
📁 *ControllersTech Home:* controllerstech.com
### ▶︎ Related Videos
1️⃣ *STM32 USB CDC Virtual COM Port:* youtu.be/O4o-ed5veh4
2️⃣ *STM32 USB HID Device: Mouse/Keyboard:* youtu.be/5SkVv5UY8cw
3️⃣ *STM32 USB Tutorials Playlist:* youtube.com/playlist?list=PLfIJKC1ud8gj5iYMN53m4H-Gw3tv9FBxO
🔔 *Subscribe for more STM32 and embedded systems tutorials!*
👍 Like and share if this tutorial helped you.
******** SUPPORT US ********
🎁 Donate on Paypal: paypal.me/controllertech
🏆 Become a Member on Patreon: patreon.com/controllerstech/join
🎓 Join Youtube Membership: youtube.com/channel/UCkdqtSMnhYuMsJkyHOxiPZQ/join
🌐 *Connect:*
Facebook: facebook.com/controllerstech
Telegram: https://t.me/controllerstechdiscuss
Instagram: instagram.com/controllerstech
Website: controllerstech.com










