STM32 USB HID Gamepad | Read Joystick over ADC+DMA and Send to PC | USB Series Part 2 @ControllersTech
STM32 USB HID Gamepad | Read Joystick over ADC+DMA and Send to PC | USB Series Part 2  @ControllersTech
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
STM32 USB HID Gamepad | Read Joystick over ADC+DMA and Send to PC | USB Series Part 2Interface LCD1602 with STM32 via I2C | CubeMX + HAL Guide | Print Strings Numbers FloatsSTM32 Modbus TCP Server – Read & Write Holding Registers | Mongoose + Web UIContinuous Servo with STM32 || PART 2 || Vary RPM using PotentiometerModbus #3. STM32 as Master || Write coils and RegistersHow to use Ethernet on Riverdi STM32 Embedded Displays || PoE Add-onTuya T5-AI Board Review + Complete AI Chatbot Setup (Step-By-Step Tutorial)STM32 FDCAN Normal Mode – Message RAM, Filters & HAL Callbacks | STM32H745STM32 CMSIS-RTOS (Part 1): FreeRTOS Setup, Tasks & Scheduler ExplainedHow to set up TouchGFX with SPI Displays || ILI9341STM32 Ethernet with W5500 (PART 5): STM32 as HTTP WebServer | LED ControlSTM32 Custom Bootloader (Part 4): Implement OTA FLAG Mechanism
ControllersTech |

STM32 USB HID Gamepad | Read Joystick over ADC+DMA and Send to PC | USB Series Part 2

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER