ESE 5190 · Team 09 · F25 · UPenn
MACHINE NOT LEARNING
// PROJECT_OVERVIEW
A portable music game mat powered by ATmega328PB. Players step in rhythm with preloaded songs across a 3×3 grid. Each correct step triggers full LED illumination and synchronized sound feedback via PWM buzzer, while a TFT LCD tracks real-time scores.
Commercial arcade dance machines are expensive, bulky, and inaccessible for home use. We built a portable, affordable alternative that delivers the same rhythm-game experience — integrating hardware design, sensor systems, and human–computer interaction into a compact mat.
// SIGNAL_CHAIN
// DEMO_VIDEOS
// HARDWARE_DESIGN
■ HINT ■ HIT ■ IDLE
// FIRMWARE_ARCHITECTURE
remaining_ms for note duration tracking and asserts sample_flag for periodic ADC polling without busy-waiting.// MIDI note to frequency (exponential mapping)
f = 440 × 2^((midi - 69) / 12)
// Frequency to Timer0 TOP value (Fast PWM, prescaler=8)
TOP = F_CPU / (2 × prescaler × freq) - 1
// ADC-based deadlock fix: use interrupt-driven sampling
// instead of blocking ADC reads to prevent Timer1 race condition
ISR(ADC_vect) {
adc_result = ADC;
adc_ready = true;
}
// VALIDATION_RESULTS
| ID | Requirement | Status | Outcome |
|---|---|---|---|
| SRS-01 | Pressure sensors sampled every 50 ms ±10 ms | Confirmed | ISR at 5ms implemented for stable sampling |
| SRS-02 | LED hint ~0.5s before step; full light on correct hit | Confirmed | Block lighting synced with UI and BGM |
| SRS-03 | LCD score refresh within 1s of step | Confirmed | Immediate feedback imperceptible to human eye |
| SRS-04 | Final score displayed within 3s of song end | Confirmed | Immediate display at song completion |
| SRS-05 | PWM buzzer plays correct pitch only on valid step | Confirmed | Correct step → tone; incorrect step → silence |
| SRS-06 | Button selects difficulty / switches songs | Modified | Repurposed as start/reset button for sync reliability |
| ID | Requirement | Status | Outcome |
|---|---|---|---|
| HRS-01 | ATmega328PB accurate timing for LED/sound sync | Confirmed | Demo shows full lockstep between LED, speaker, LCD, and sensors |
| HRS-02 | FSR detects 0–686N, sensitivity ≥10 mV/N | Confirmed | ADC threshold 850/1024 reliably distinguishes press/no-press |
| HRS-03 | LED latency <50ms, 9 distinct colors | Confirmed | White hint → red hit transition verified in demo |
| HRS-04 | Speaker 200Hz–5kHz, ≥90dB at 0.5m | Confirmed | Correct pitch at high volume synchronized with BGM |
| HRS-05 | LCD score refresh ≤200ms | Confirmed | Score updates immediately on each scoring event |
| HRS-06 | Button for song/difficulty switching | Confirmed | Button resets score and restarts game loop |
// DEVELOPMENT_LOG
ADC_read(). Fixed by switching to interrupt-driven ADC sampling.// LESSONS_LEARNED
// TEAM_ROSTER
// RESOURCES