Documentation for ESP32 Data Logger
This code is for an ESP32-based data logging system, utilizing various libraries and APIs for handling tasks such as data logging, wireless communication, and configuration management.
This code is for an ESP32-based data logging system, utilizing various libraries and APIs for handling tasks such as data logging, wireless communication, and configuration management.
Explain how the master node performs scheduled tasks such as polling data, time synchronization, and configuration verification. Additionally, it handles web API commands triggered by a flag. The main control loop checks the current time and executes tasks at specified intervals, ensuring efficient coordination and communication within the network. The implementation includes a flow chart for clarity and detailed steps for setting up time synchronization and task scheduling.
In this post, we explore a rough protocol for transferring large files over LoRa using ESP32 devices. The protocol involves sending metadata, file chunks, and an end-of-transfer message, with acknowledgment handling to ensure reliable transmission.
Explore how to send and receive structured messages using LoRa with ESP32 devices. Instead of sending simple strings, we use structs to include a MAC address for identification, extraction instructions, and a payload. By using an enum to declare message types and identifying the message type with the first byte (msgType), we eliminate the need to include message length in the transmission.
When developing with the ESP32 or Arduino, using the LoRa.onReceive function requires careful handling due to its operation within an interrupt context. Interrupt Service Routines (ISRs) in the ESP32 have stringent requirements and limitations. Performing complex or time-consuming tasks within an ISR can lead to various issues, including crashes and reboots.