@BDub I loaded the 0.6.1-rc on my Electron and I want to verify if this code is still needed when using System Threading & System.sleep(SLEEP_MODE_DEEP, 3600);
to get the modem to go to sleep or not?
The fix does not say it was merged but there are tons of other improvements so I just wanted to make sure.
I’m using this code to put the Electron to sleep if the battery SOC is below 20%.
SYSTEM_MODE(SEMI_AUTOMATIC);
SYSTEM_THREAD(ENABLED);
The Electron into deep sleep if the SOC is below 20%:
Cellular.on();
delay(10000);
Cellular.command("AT+CPWROFF\r\n");
delay(2000);
//FuelGauge().sleep(); //Keep Fuel Gauge ON for more accurate readings.
//delay(2000);
digitalWrite(ledPin, HIGH); // sets the LED on
delay(150); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
System.sleep(SLEEP_MODE_DEEP, 3600);