Bee Data Logger MQTT with SD Card Backup
Send sensor readings to an MQTT broker over WiFi with automatic SD card backup when the network is unavailable. Combines real-time IoT connectivity with reliable local storage for remote deployments.
Overview
This project combines the Bee Data Logger's WiFi connectivity with its SD card storage to create a resilient IoT data pipeline. Sensor readings are published to an MQTT broker in real time, but if the WiFi connection fails, data is automatically buffered to the microSD card for later retrieval or re-transmission.
How It Works
- The Bee Data Logger reads sensor data from I2C peripherals via the Qwiic connectors
- It attempts to connect to WiFi and publish the data to a configured MQTT broker
- If the connection fails, data is saved to the SD card with RTC timestamps
- On the next successful connection, buffered data can be re-sent
- The board can use deep sleep between readings to conserve power
Hardware Required
- Bee Data Logger (ESP32-S3)
- microSD card
- LiPo battery
- I2C sensor breakouts (temperature, humidity, pressure, etc.)
Software
The Arduino Helper library includes the MQTT-backup-SD example sketch that demonstrates this pattern. The library provides convenient functions for battery monitoring (getBatteryVoltage()), USB detection (getVbusPresent()), and LDO power management (setLDO2Power()).
Use Cases
- Remote weather stations with intermittent connectivity
- Agricultural monitoring in areas with spotty WiFi coverage
- Industrial sensor networks requiring data integrity guarantees
- Beehive monitoring in remote apiaries






