I am working on a project with an MKR1000 WiFi.
The idea is to use two ultrasonic sensors to detect if people pass through a doorway and keep count. The project involves sharing this number via telegram bot.
I use a watchdog to solve any eventual issues with the WiFi connection or with the Telegram server. Therefore I need to find a way to store the count number every time it changes to make the information survive the watchdog-triggered resets.
Possible solutions are:
Saving into flash memory. CONS: limited write cycles.
Using an SD card. CONS: it looks like an expensive solution to store just an integer number.
A webhook to save data into a server (for example into a google sheet). CONS: limited number of (free) requests to the server.
I am about to give up and accept the SD card solution.
But I wanted to check if anyone has a suggestion.