
ECE445L RSLK V2
andyMath7745/JustDance-TinyML-Embedded
Inspired by the game Just Dance, a DIY Embedded System to classify user gestures and simulate 2-player gameplay

Inspired by the game Just Dance, a DIY Embedded System to classify user gestures and simulate 2-player gameplay
ECE445L Lab7 is an open-source printed circuit board by andyMath7745, from the andyMath7745/JustDance-TinyML-Embedded repository on GitHub. It is a 2-layer board of 115 × 94 mm with 18 parts on 77 nets.
It is built around the EK-TM4C123GXL and IRLD024PBF. Its parts include 5 switches, 3 ICs, 2 capacitors, 1 resistor and 1 diode. It belongs with the ESP8266 boards of this library.
I built this project as a real-time embedded gesture-recognition system with a custom PCB using TM4C123 microcontrollers, LSM6DSOX IMUs, ESP8266 wireless communication, and fixed-point TinyML inference.
Custom PCB and handheld controller modules used in the embedded gesture classification system
The system captures motion from handheld controller modules, segments raw IMU data into meaningful gesture windows, extracts engineered features, runs lightweight classifiers directly on-device, and streams results to a central hub and host display. The full pipeline runs on embedded hardware rather than relying on a PC for inference.
My goal with this project was to design a complete embedded system capable of classifying human motion under tight hardware constraints.
Each controller:
A central hub coordinates timing, aggregates controller outputs over ESP8266, and forwards results to a PC over UART for visualization.
SEG and DETECT)Controller Modules (TM4C + IMU)
↓
Sensor processing + segmentation
↓
Feature extraction (32 features)
↓
TinyML / rule-based classification
↓
ESP8266 wireless messages
↓
Central Hub (TM4C)
↓
UART output
↓
Host PC (Python visualization/logging)A key design decision I made was to keep all classification on the embedded controllers. The PC is only used for visualization and logging, not inference.
sw/
sw_Player1_Controller/ → Controller firmware
sw_Player2_Controller/ → Second controller firmware
sw_Audio/ → Central hub firmware
sw_Display/ → Python host interface
hw/ → KiCad hardware design files
Resources/ → Datasheets and referencessw_Player1_Controller/src/Lab1.csw_Player2_Controller/sw/src/Lab1.csw_Audio/sw/src_latest/Lab5.cEach controller runs a full embedded ML pipeline:
IMU read
→ axis remap
→ filtering
→ calibration
→ segmentation
→ feature extraction
→ classification
→ outputI read accelerometer and gyroscope data over I2C and remap axes into a consistent real-world coordinate system:
IRL X = sensor Y
IRL Y = sensor Z
IRL Z = sensor X At startup, I run a strict 5000 ms calibration phase using timer-based scheduling. This avoids drift and ensures stable baseline values for bias and gravity compensation.
I use Timer0A as a free-running hardware timer and schedule all sampling relative to time instead of loop delays. This keeps behavior deterministic even with UART output or I2C latency.
I designed a segmentation engine that detects meaningful motion using:
Each gesture can override segmentation parameters, which makes the system flexible across very different motion types.
For each segment, I compute 32 engineered features describing motion shape and intensity.
Examples include:
Instead of feeding raw time-series data into a large model, I compress each gesture into a compact feature vector to stay within embedded constraints.
I implemented small neural networks directly in firmware using fixed-point math.
Typical structure:
16 inputs → 3 hidden (ReLU) → 1 outputAll weights, biases, and normalization parameters are stored as scaled integers. This avoids floating-point overhead and keeps inference fast and deterministic.
Some gestures use ML models, while others use rule-based scoring depending on how well they can be defined analytically.
The system outputs structured UART messages:
SEG,<MOVE>,<32 values>DETECT,<MOVE>,<score>I use SEG for debugging/training and DETECT as the final classification output.
Instead of classifying every segment independently, I accumulate scores across a gesture window and only output a final detection after enough evidence is collected.
This significantly reduces noise and false positives.
The hub is another TM4C system that:
I wrote a Python interface using:
pyserial for communicationtkinter for UIopencv / Pillow for visualizationThis layer is purely for monitoring—the embedded system performs all classification.
This system is built on:
All hardware files are included in the hw/ directory.
This project combines:
The most important aspect is that the entire ML pipeline runs on-device, making it a true embedded TinyML system rather than a PC-based demo.
This is a working embedded system prototype with real-time gesture classification, multi-device coordination, and on-device ML inference. The core pipeline is fully implemented and functional on embedded hardware.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | ~ | ECE445L:MountingHole_4_40 | H1, H2, H3, H4 |
| 1 | 100nF | ECE445L:C_Axial_200mil | C1 |
| 1 | 10k | ECE445L:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R1 |
| 1 | 1N914 | Diode_THT:D_5W_P12.70mm_Horizontal | D1 |
| 1 | 4.7uF | ECE445L:CP_Radial_Tantal200mil | C2 |
| 1 | Adafruit ST7735R | ECE445L:adafruit_st7735r2 | U2 |
| 1 | DOWN | ECE445L:SW_PUSH_6mm | SW2 |
| 1 | EK-TM4C123GXL | ECE445L:ti_EKTM4C123GXL | U1 |
| 1 | ESP8266-01/ESP-01 | ECE445L:ESP8266_FemaleConnector | U3 |
| 1 | IRLD024PBF | ECE445L:DIP920W60P254L490H457Q4N | Q1 |
| 1 | LEFT | ECE445L:SW_PUSH_6mm | SW3 |
| 1 | MODE | ECE445L:SW_PUSH_6mm | SW5 |
| 1 | RIGHT | ECE445L:SW_PUSH_6mm | SW4 |
| 1 | Speaker | ECE445L:PinHeader_1x02_P2.54mm_Vertical | LS1 |
| 1 | UP | ECE445L:SW_PUSH_6mm | SW1 |

andyMath7745/JustDance-TinyML-Embedded
Inspired by the game Just Dance, a DIY Embedded System to classify user gestures and simulate 2-player gameplay

samienr/ECE445L-final
Public copy of our Embedded Systems Design Lab final project

Andres-Wearden/Lab10
The typical explanation for the repo structure. Lab specific instructions can be found further below.

AndrewYin04/VR-Goggles-Embedded-Lab
The typical explanation for the repo structure. Lab specific instructions can be found further below.

K0-p/Garfield-Wheel
HID-compliant game controller with embedded button mapping firmware and gyroscope controls

evanmayer/hotspot
Code for driving a cable-driven parallel robot for mapping beams on surfaces.

aidanaalund/ece-445l-final-project
My final mechatronics project from the Spring 2025 Embedded Systems Design Lab course. Taught by Dr. Jonathan Valvano. Team was Aidan Aalund, Alexa Aguilar Izquierdo, Paul Schnoebelen, Eric Zang, and Brian Ahn.


tanai-prathapam/lab8_445L_personal
The hw folder should contain your schematic and board files for your PCB or circuits. In later labs, you will be creating schematics for your circuit in EAGLE. A setup tutorial can be found here.
It measures 115 × 94 mm and has 2 copper layers, 1.6 mm thick.
18 parts, built around the EK-TM4C123GXL and IRLD024PBF. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the andyMath7745/JustDance-TinyML-Embedded repository on GitHub, at the commit this page was made from: the board is hw/ECE445L_Lab7/ECE445L_Lab7.kicad_pcb and its schematic hw/ECE319K_Starter/ECE319K_Starter.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask andyMath7745 before reusing the design.