My goal is pretty simple. I need to loop through MEASURE, PUBLISH, SLEEP at a rate of between 20min-1hr with the lowest possible power consumption. My project uses the BORON with 1.5.0 and the Particle Workbench Development environment.
also using SYSTEM_MODE(AUTOMATIC);
I have been able to achieve a MEASURE, PUBLISH, DELAY loop, but when I switch out the DELAY with SLEEP all kinds of strange things happen.
I have tried several different configurations of SLEEP as a replacement for delay(20min) in my loop.
This one results in the publishes never reaching the cloud even though I have a delay(5s) between PUBLISH and SLEEP. It does breath cyan for a few seconds every 20min but nothing publishes. Also the current measurement is still a whopping 10mA.
SystemSleepConfiguration config;
config.mode(SystemSleepMode::STOP)
.duration(20min);
SystemSleepResult result = System.sleep(config);
The next one caused 10 flash SOS.
SystemSleepConfiguration config;
config.mode(SystemSleepMode::STOP)
.flag(SystemSleepFlag::WAIT_CLOUD)
.duration(20min);
SystemSleepResult result = System.sleep(config);
This one results in the Publish being run 2-3 times in less than a second every 20 min.
SystemSleepConfiguration config;
config.mode(SystemSleepMode::STOP)
.network(NETWORK_INTERFACE_CELLULAR)
.flag(SystemSleepFlag::WAIT_CLOUD)
.duration(20min);
SystemSleepResult result = System.sleep(config);
I am pretty new to Particle, but thought this would be pretty simple. I really appreciate any help or advise.