How lihaolun201003/air-firmware works
AIR is STM32-based air-monitor firmware for a PMS5003ST sensor, ILI9341 display and HC-06 Bluetooth link. Its principal workflow receives and parses sensor frames, tracks reading freshness/status, presents measurements and diagnostics on the display, and optionally streams telemetry over Bluetooth using Blinker JSON or the legacy ENV protocol. The current main loop and several implementation details are only partially excerpted; uncertain runtime links are shown as unverified rather than asserted.
Main entry points: main.cpp Firmware loop · air_bluetooth.cpp Bluetooth service · boot_animation.cpp Boot animation · pms5003st.h Frame parser
Components 12
Sensor acquisition
- Frame parser
AIR/include/pms5003st.h - Reading status
AIR/include/air_bluetooth.h
Display experience
- Measurement display
AIR/src/main.cpp - Boot animation
AIR/src/boot_animation.cpp - Character asset
AIR/include/boot_character_data.h - Panel startup
AIR/src/boot_display.cpp
Bluetooth telemetry
- Bluetooth service
AIR/src/air_bluetooth.cpp - Telemetry formats
AIR/include/air_bluetooth.h
Other components
- Device operator
- Firmware loop
AIR/src/main.cpp - PMS5003ST sensor
- HC-06 / Blinker app
Connections 11
- PMS5003ST sensor → Firmware loop: sends frames
- Firmware loop → Frame parser: feeds bytes
AIR/src/main.cpp - Firmware loop → Reading status: tracks readings
AIR/src/main.cpp - Firmware loop → Measurement display: renders readings
AIR/src/main.cpp - Firmware loop → Boot animation: starts animation
- Boot animation → Character asset: uses pixels
AIR/src/boot_animation.cpp - Firmware loop → Panel startup: initializes panel
- Firmware loop → Bluetooth service: polls link
- Bluetooth service → Telemetry formats: formats telemetry
AIR/src/air_bluetooth.cpp - Bluetooth service → HC-06 / Blinker app: sends telemetry
- Device operator → Firmware loop: views readings