A small snippet (code) for ESP32

Job ID: 35019876

Budget: €8 – €30 EUR

I want the ESP32 to work in deep sleep mode.

What I want is the following: with only one momentary button (obviously this one that is connected to a gpio wake up pin) to switch between two tasks. Pressing once the momentary button to send A data (this is the task "A") and pressing again to send B data (task "B") , if press again send A data, and so on. (for example sending data to another ESP32)

After the task, the ESP32 must be sleeping.

At the same time, when the ESP32 resets (lose its power supply and get it back) I want the ESP32 to send again
what it did in last time before the power cut off, for example if last time had sent the data A, before the power cut, now after the ESP32 gets again back the power, to send the data A again. After that, to be back in deep sleeping mode.


I want it now or in the worst case tomorrow morning.
Related categories: C Programming Arduino