A PlatformIO project for the Seeed Wio Terminal that reads data from a Grove HM3301 PM2.5 laser dust sensor and broadcasts the readings over Bluetooth Low Energy (BLE).
- Seeed Wio Terminal
- Grove HM3301 Laser PM2.5 Sensor
- microSD card (FAT32 formatted)
- I2C grove connection
- Real-time particulate matter measurements:
- PM1.0 (atmospheric)
- PM2.5 (atmospheric)
- PM10.0 (atmospheric)
- BLE connectivity:
- Device name: "PM2.5 Sensor"
- Real-time data notifications
- Historical data access
- TFT display showing:
- Current PM readings
- BLE connection status
- Debug information
- Data logging:
- Readings logged every 5 minutes to SD card
- CSV format with timestamps
- Automatic file management
- Historical data:
- Hourly averages calculation
- 24-hour history retention
- Accessible via BLE
- Time synchronization:
- Set the device time via BLE
- Alerting:
- BLE alerts for high PM2.5 levels
- Service UUID:
91bad492-b950-4226-aa2b-4ede9fa42f59
- Characteristics:
- PM1.0:
91bad493-b950-4226-aa2b-4ede9fa42f59
(Read, Notify) - PM2.5:
91bad494-b950-4226-aa2b-4ede9fa42f59
(Read, Notify) - PM10:
91bad495-b950-4226-aa2b-4ede9fa42f59
(Read, Notify) - History:
91bad496-b950-4226-aa2b-4ede9fa42f59
(Read) - Time Sync:
91bad497-b950-4226-aa2b-4ede9fa42f59
(Write) - Alert:
91bad498-b950-4226-aa2b-4ede9fa42f59
(Read, Notify)
- PM1.0:
- Seeed_HM330X (Grove PM2.5 Sensor Library)
- Seeed_Arduino_rpcBLE
- Seeed_Arduino_rpcUnified
- TFT_eSPI
- Seeed_Arduino_FS
- Seeed_Arduino_RTC
- Data is stored in
/data/PM_xxxx.csv
files on the SD card - CSV format:
Power_Cycle,Timestamp,PM1.0,PM2.5,PM10,Uptime_Sec
- Power cycles are tracked in
/data/power_cycle.txt
- Sensor readings: Every 5 seconds
- Data logging: Every 5 minutes
- Hourly averages calculation: Every hour