I am trying to write into my code where the length of time of deep sleep is controlled by a reply from the web (currently using Losant). For instance I am wanting to have my ESP with gyro send in data and then sleep for 10 minutes but if something out of the ordinary is detected by losant then it would instruct the ESP to stay awake and send data every second until instructed to go back to normal 10 minute sleep cycle.
Any help would be greatly appreciated.