What
Create a reaction game that randomly asks the player to perform different actions using various sensors and the D-PAD, then measures response time.
Why
Fun way to combine multiple STeaMi drivers in a single interactive example. Teaches event-driven programming and sensor polling.
Suggested approach
- The OLED displays a random command:
- "TILT LEFT" → check ISM330DL accelerometer X axis
- "PRESS UP" → check MCP23009E D-PAD
- "COVER SENSOR" → check APDS9960 ambient light drops below threshold
- "BLOW" → check HTS221 humidity spike
- Start a timer with
ticks_ms()
- Wait for the correct sensor to trigger (with a 5-second timeout)
- Display reaction time on the OLED + play a success/fail buzzer sound
- After 10 rounds, show the average reaction time as the final score
Hardware
- SSD1327 OLED + buzzer
- ISM330DL, MCP23009E (D-PAD), APDS9960, HTS221
Documentation
Write a pedagogical activity sheet for the STeaMi wiki covering:
- Learning objectives (sensors, polling, timing, game design)
- Step-by-step instructions for students
- Expected behavior and scoring
- Extension ideas (add more actions, difficulty levels, multiplayer via BLE)
What
Create a reaction game that randomly asks the player to perform different actions using various sensors and the D-PAD, then measures response time.
Why
Fun way to combine multiple STeaMi drivers in a single interactive example. Teaches event-driven programming and sensor polling.
Suggested approach
ticks_ms()Hardware
Documentation
Write a pedagogical activity sheet for the STeaMi wiki covering: