I worked for weeks on an enhancement of an Arduino sketch that shows time data of seven different timezones in the world. At intervals the RTC is updated with a datetime stamp from an SNTP service server.
The past two weeks I was adding the functionality to send some data, like time sync time_t value to a Google Sheets spreadsheet. This all works OK.
The sketch ran a whole night, every 15 minutes sending data to a Google Apps Scripts script that adds the data to the spreadsheet.
In the sketch I have built the possibility to switch the display off (go to sleep) by using the command: "M5.Display.sleep()" and switch the display
on (awake) by using the command: "M5.Display.wakeup()". The switching off or switching on is done by holding an RFID card in front of the display. The sketch also has the possibility to switch the display on or off by touching the display (it is one or the other option. For now I use the RFID tag option). I used the Arduino IDE v2.3.3. for MS Windows 11. The Arduino IDE compile and build reports :
Sketch uses 1190657 bytes (90%) of program storage space. Maximum is 1310720 bytes.
Global variables use 53384 bytes (16%) of dynamic memory, leaving 274296 bytes for local variables. Maximum is 327680 bytes.
esptool.py v4.5.1
Serial port COM6
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
[...]
Wrote 1191024 bytes (721826 compressed) at 0x00010000 in 8.6 seconds (effective 1113.8 kbit/s)...
During the execution of the sketch calls to ESP.getFreeHeap(), result in values like: 265556 downto 264052.
After the display goes black, the sketch continues to execute fine, sending at the preset intervals its data to the Google Sheets spreadsheet.
Anyone that give me a clue to solve this abnormal behaviour?