# Design notes ## Scope A powered peripheral turns local infrared motion readings into standard BLE media commands. Wi-Fi, cloud integrations, cameras and trained hand-shape models are outside the implemented system. ## Sensor and time series The sensor reports presence, area, centroid and native gesture flags. Polling is scheduled around 4 ms; trajectory sampling around 16 ms. Three-sample median filtering reduces isolated centroid jumps. Raw area/coordinates are sensor units, not hand dimensions, metric depth or finger counts. The mount maps physical left/right to decreasing/increasing sensor Y. Changing the mounting can require recalibration. ## Recognition and arbitration `SweepTracker` tracks the dominant lateral axis and commits once per visible motion. A held palm/fist followed by withdrawal is suppressed. `GripTracker` establishes an open-hand baseline, checks a recent contraction or centroid curl, waits for an endpoint to settle and latches until hand-away. `CircleTracker` integrates changes in heading, checks extent on both axes, and uses native rotation hints to confirm some clipped end arcs. Circle, grip and sweep candidates suppress conflicting interpretations. The recognition is an empirical approximation for the recorded user/mount, not anatomical pose estimation. ## BLE Consumer Control report ID 2 carries a two-byte bitfield: next bit 0, previous bit 1, play/pause bit 3, volume up bit 5, volume down bit 6. A zero report releases keys after approximately 40 ms. Report characteristics and Report Reference have encrypted access permissions. Connection, authentication, report subscription, queued notifications and actual player behavior are separate observations. Host tests confirmed that READY alone was insufficient to demonstrate operation. ## Host switching A double-click releases keys and starts a switch session. The previous peer's resolved identity and current over-the-air address are remembered, and reconnection attempts are rejected during switching. Identity is checked again after authentication. A different host must authenticate and subscribe before switching completes. Bonds survive switching; another double-click cancels. Reboot cancels the in-memory switch session. Atomic flags and a short critical section protect state shared between the loop and BLE callbacks. ## Open issue: fist versus slap Recorded open-hand slaps and clenched-fist sweeps overlap in centroid, area and duration. v24 can misclassify the latter. The user selected continuous interaction with approximate filtering rather than an added open-palm dwell prerequisite. v25 drafted a direction-dependent late-turn/area-pulse filter, but development was interrupted before replay, compilation, upload or physical testing. A low false-positive rate has not been established. Future work should evaluate independent positive/negative recordings, both directions, multiple distances and users, and regression checks for grasp, withdrawal, circles and BLE gating. ## Project process The student originated the interaction requirements and performed repeated hardware/player tests. AI-assisted coding and open-source libraries were used substantially for implementation and debugging. The history includes failed hypotheses and reverted branches; it should not be described as 24 universally successful releases.