Inspiration 🧠
We wanted to make drumming accessible - no expensive kits, no noise complaints, no sticks through the ceiling (your landlord will thank you). Just motion, rhythm, and a bit of embedded wizardry. The goal? Turn hand gestures into beats in real time. Because music making should be as easy as waving your hand in the air like you just do not care... literally.
What it does 🥁
Beats by Air is a motion-powered air-drumming system that uses MPU6050 sensors to detect swinging gestures and translate them into virtual drum hits: snare, hi-hat, tom, crash.
How we built it 🛠️
We used:
- MPU6050 IMUs (accelerometer + gyroscope combo)
- I²C communication on a QNX RTOS device (because
/dev/i2c1is the new VIP pass) - Multithreaded C code with real-time
SCHED_FIFOscheduling (priorities 90/89 so the right hand does not get jealous) - A gesture detection algorithm using downward acceleration, peak-detect timing, and pitch/roll orientation
-Everything runs on QNX RTOS, ensuring hits are detected and responded to in real time - no screen, camera, or drum throne required. Your living room becomes an instant concert.
Drum zone classification is based on tilt angles, like so:
$$ \text{pitch} = \arctan!\biggl(\frac{-a_x}{\sqrt{a_y^2 + a_z^2}}\biggr) \times \frac{180}{\pi} $$
Once a hit is confirmed, we fire off a UDP packet to a host system running Python.
Challenges we ran into 🧩
- Setting up I²C on QNX took a long time to understand how to integrate it. Turns out
0x68is not psychic. - Managed sensor noise through a comprehensive calibration routine to improve data accuracy.
- Configured real-time scheduling and adjusted thread priorities to ensure balanced CPU allocation between both sensor threads.
Accomplishments we’re proud of 🏆
- Highly reliable real-time gesture recognition with zero false positives.
- Well-structured processing pipeline: motion → classification → network output → sound.
- Consistent sampling interval below 2.5 ms to ensure accurate detection of rapid gestures.
What we learned 📚
- How to use QNX RTOS for multithreaded sensor polling and real-time gesture processing
- Translating raw IMU data into meaningful drum hits (and avoiding headbanging)
- The tragic difference between
usleep()and punctualclock_nanosleep() - You can indeed build a functional air-drum interface in one day, though sleep is optional....caffine isnt.
Built With
- c
- embedded
- gyroscope
- hardware
- i2c
- linux
- mpu6050
- qnx
- raspberry-pi
- rtos
- sensor
- systems



Log in or sign up for Devpost to join the conversation.