I have project that reads sensor information, transmits it to a cloud service, and then goes into a deepsleep mode until the next reading. Because i want the device to be in a deep sleep mode it means turning off the wifi so when it wakes up it must first reconnect to the wifi before being able to send data, but since I want the reading to be taken on a regular interval it means not waiting for the wifi to finish up connecting before taking the readings.
I'm fairly new to low power modes and interrupts so please bare with me.
What i would like is for the device to wake up just before I need to take the readings, based on a timer (HH:04:55). Start an asynchronous function to reconnect to the wifi. In the meantime it would take the readings on a timer (HH:05:00) and wait for the Promise to come back before sending it off to the cloud. Once the information is sent, it goes back into deepsleep and waits for the next timer (HH:09:55).
Now this is something I could program in JS but i'm a little more lost in the Arduino IDE. Can anyone give me a hand on where I should start with this? Many many many thanks!