EMBEDDED SYSTEMS / SENSOR INTEGRATION
Small device.
Thoughtful firmware.
An STM32 step counter built around an LSM6DS inertial sensor, an OLED interface and a cooperative task scheduler. Interrupt-driven step events become distance, goal progress and useful feedback.
EMBEDDED LAB / INTERFACE RECREATION
Every step.
A little progress.
TRY THE CONTROL FLOW
A browser recreation of the firmware’s steps, distance and goal screens. The real device uses the IMU’s embedded pedometer and interrupt events. The animated trace is illustrative; distance uses the firmware’s assumed 0.8 m step length.
01 / THE EMBEDDED ARCHITECTURE
A short interrupt.
A clear data path.
The LSM6DS embedded pedometer raises a step-detection interrupt. The interrupt handler sets a flag; the foreground IMU task reads the counter over SPI and updates the local step model. Keeping bus work out of the interrupt makes the control flow easier to manage.
The first interrupt establishes a baseline so a stale sensor count is not treated as new activity after boot. A moving average smooths acceleration readings for the interface.
02 / THE HUMAN INTERFACE
Navigation with intent.
A joystick navigates steps, distance and goal progress on an SSD1306 OLED. Alternative units, test input, an adjustable goal, progress LEDs and a buzzer give the device a complete interaction flow.
The cooperative scheduler services the buttons, joystick and IMU at 50 Hz, with the display at 4 Hz. Goal notifications are latched as one-shot events, avoiding repeated alerts on every update.
NEXT / THE ACTUAL HARDWARE
Device photos & build details
Project photography will be added when available.
ENCE361 Group 104 team project. Based on the supplied STM32C0 firmware: task_imu.c, app.c, step_counter.c and task_display.c. The browser interface illustrates source behaviour; no physical accuracy or battery-life results are inferred from the code.