Hello,
I’m trying to get the lowest possible energy consumption on my electron board and I cannot go lower than 1,97mA
My code below:
SYSTEM_MODE(MANUAL);
SYSTEM_THREAD(ENABLED);
void setup() {
PMIC().disableCharging();
Cellular.on();
softDelay(1000);
Cellular.connect();
softDelay(5000);
Particle.connect();
softDelay(5000);
}
void loop() {
//Serial.println("preSleep");
goToSleep();
}
void goToSleep() {
Cellular.on();
Particle.connect();
Particle.disconnect();
softDelay(5000);
Cellular.disconnect();
Cellular.off();
RGB.control(true);
RGB.color(0,0,0);
softDelay(5000); // Step through the process safely to ensure the lowest Modem Power.
System.sleep(SLEEP_MODE_SOFTPOWEROFF, 60);//, SLEEP_NETWORK_STANDBY); //SLEEP_MODE_SOFTPOWEROFF
}
inline void softDelay(uint32_t t) {
for (uint32_t ms = millis(); millis() - ms < t; Particle.process()); // safer than a delay()
}
Thank you,