Fig. 01
Try it
AI-generated voice and avatar
01
Problem & approach
The problem
Use a hand movement as the key: record a gesture once, then recognize it again even when it is performed at a different speed.
The approach
An event-driven Mbed OS program on the STM32: a worker thread handles button interrupts, mutexes guard shared flags and sensor data, and an interrupt-driven SPI pipeline feeds a complementary filter and a DTW matcher.
02
How it works
- ConcurrencyConcurrent task scheduling with a dedicated worker thread for asynchronous button interrupts, and mutexes that prevent race conditions on shared flags and 3D sensor data.
- SPI pipelineAn interrupt-driven SPI pipeline at 1 MHz captures raw gyroscope telemetry, with EventFlags for non-blocking data-ready callbacks.
- FilteringA complementary filter stabilizes the angular velocity.
- MatchingDynamic Time Warping with Euclidean distances matches the gesture sequence even when it is performed faster or slower.
03
Results & stack
- 1 MHz
- interrupt-driven SPI
- DTW
- variable-speed matching
- STM32
- Mbed OS
- SPI
- C++
- DTW
