When i add a delay (see **1) before i go to deepsleep the values are received.
Is this normal? or is there a better alternative?
See code below
2) is io.run() required if i just send data to adafruit.IO ?
Code: Select all
void loop() {
io.run(); // Required at top of the loop to process incoming data
Serial.print("sending -> ");
int rndtemp = random(255);
Serial.println(rndtemp);
if(!Temp->save(rndtemp)) { // Send value to feed
Serial.println("failed to send value");
}
delay(500); // **1
Serial.println("Going to deepsleep");
ESP.deepSleep(15e6);
}