What
Create a step counter example that detects footsteps using the ISM330DL accelerometer and displays the count + estimated distance on the OLED.
Why
Practical application of accelerometer data processing. Teaches peak detection, thresholding and debouncing — fundamental signal processing concepts on a tangible use case.
Suggested approach
- Read `acceleration_g()` continuously from the ISM330DL
- Compute the magnitude: `mag = sqrt(axax + ayay + az*az)`
- Detect a step when the magnitude crosses a threshold (e.g. 1.2g) with a minimum interval between steps (debounce ~300ms)
- Display on the OLED using `steami_screen`:
- `screen.value(str(steps))` as the main number
- `screen.subtitle("~{} m".format(steps * STRIDE_M))` for estimated distance
- `screen.gauge(steps, max_val=TARGET_STEPS)` for a progress arc toward a daily goal
- `try/finally` with `imu.power_off()`
Learning goals
- Signal magnitude computation
- Peak detection with threshold + debounce
- Real-time counting and display
Hardware
- ISM330DL accelerometer
- SSD1327 OLED
Documentation
Write a pedagogical activity sheet for the STeaMi wiki covering:
- Learning objectives (signal processing, peak detection, debounce)
- Step-by-step instructions
- How to calibrate the threshold and stride length
- Extension ideas (calorie estimation, activity classification walk/run, BLE broadcast to phone)
What
Create a step counter example that detects footsteps using the ISM330DL accelerometer and displays the count + estimated distance on the OLED.
Why
Practical application of accelerometer data processing. Teaches peak detection, thresholding and debouncing — fundamental signal processing concepts on a tangible use case.
Suggested approach
Learning goals
Hardware
Documentation
Write a pedagogical activity sheet for the STeaMi wiki covering: