DustinYe/gesture-media-controller

Hardware & IoT

Builds an ESP32 gesture sensor into a Bluetooth media remote, so hand motions control a paired computer or phone.

204
43
C++
6 days old

A complete, honest hardware prototype: gesture recognition runs on an AtomS3R with a PAJ7620U2 infrared sensor, and hand motions become standard BLE media key presses. It suits tinkerers who already own or plan to buy the exact parts and want a documented, tested baseline, not a general-purpose gesture platform.

The problem

You want to pause music or change volume without touching keyboard, mouse or phone — say, while cooking, soldering or presenting. Ordinary remotes need a hand on them, and cameras or ML models add cost and setup. Here a small board watches short hand movements in front of an infrared sensor and sends consumer-control HID commands over BLE to whichever device is connected. The interaction is one step: gesture, then the host player reacts, though pause, track and volume behavior ultimately depends on the player.

What's different

The distinctive part is how the firmware turns noisy sensor data into a few stable events. Median filtering feeds three trackers — horizontal sweeps, grip (palm closing to fist), and circles counted from changes in motion heading — and an arbitration layer enforces one event at a time and guards host switching. A consumer-only, two-byte HID report with automatic key release keeps the Bluetooth side conventional. The front screen doubles as a button for pausing gesture control, switching hosts and clearing stored bonds.

The main trade-off is that the PAJ7620U2 does not actually recognize gestures in the way the demo titles suggest: it reports motion features such as center, area and presence, and the firmware approximates gestures from movement. The README is explicit that finger counting and fist-versus-palm classification are impossible with this sensor, and that a clenched-fist lateral movement can still fire a track command in v24; the later fist/slap filter exists only as an unverified experiment. So expect a prototype feel, with thresholds tied to your mounting, distance and motion.

Who should try it

Good fit: an embedded hobbyist with an AtomS3R, a Unit Gesture sensor and a Grove cable who wants a documented baseline to flash and a clear list of what does and does not work, perhaps to adapt for a specific room or accessibility use. The versioned history (v13–v23 snapshots) and recorded trajectory fixtures give you something concrete to modify and replay.

Poor fit: anyone wanting finger-level gesture control, a finished consumer accessory, a kit with enclosure and instructions, or Xiaomi Home / Home Assistant integration — the README lists that goal as not implemented. It is also a poor fit if you need one remote to juggle several hosts at once, since the firmware controls one host at a time.

Requirements and limitations

The hardware is specific: the AtomS3R board, the PAJ7620U2-based Unit Gesture U127, a Grove cable, a compatible BLE host and USB-C power/programming. Firmware is built with a pinned M5Stack ESP32 Arduino core 3.3.9 and board target M5AtomS3R; the supplied scripts are PowerShell, with IDE instructions in the build guide. Validation evidence is a set of checks at different development stages, not a platform-by-function matrix, and there is no claimed accuracy percentage or latency figure.

Ongoing upkeep matters too: recognition depends on your physical mounting and distance, so thresholds may need retuning; uploading new firmware replaces the program on the board; and no project-wide license has been selected, which limits reuse in other projects. The Python replay tests are a separate reference implementation, not execution of the C++ binary, and one expected-failure case documents the unresolved fist-sweep false positive.

HotRepo's take

HotRepo first tracked the repository on 2026-10-24, one day after its creation, and it showed 204 total stars at #20 on the cpp NEW-REPOSITORY board on 2026-10-25 — a dated snapshot, not daily growth. The stored sample covers only two dates, so trend persistence cannot yet be judged. Before investing, check the validation notes and decide whether the documented fist-sweep false positive is acceptable for your use.

Written by AI from the project's README, updated October 25, 2026. The project's own docs are the source of truth.