Posts

Showing posts from December, 2024

A Math Fact for the New Year 2025!

Image

Reading LittleFS file into buffer for sending

 Reading LittleFS file into buffer for sending to another ESP32 via ESP Now. Created dummy file 1321 bytes long with "sensor" information in the form like this:     uint8_t sensorData1[] = "[ 00 12:05:12:06:01 22 33 44 \n"; Red stuff above is timestamp to later get in real time from DS3231.  Blue stuff is dummy sensor information, two ascii chars representing 00 to 99. Black stuff is just formatting chars and spaces. The following program reads in about 43 lines of sensor information as above and puts it into LittleFS file called sensorReadings.txt. This file then gets cut up into 200 byte chunks (via sendBuf[200] ) and gets sent to dummy sender file called sendNowBuf(). No actual sending takes place, so next sub-project is to send the 200 byte chunks one by one via ESPNow to second ESP32. //41 From Arduino Examples/mnt/c/Users/Dell/Documents/Arduino/Working202411/LITTLEFS_test2/LITTLEFS_test2.ino #include <Arduino.h> #include "FS.h" #include <Li...