I have a question which I’m not sure how to handle with the Electron. I am sending an electron within an enclosure to a friend. Since it will only be power by the LiPo battery for many days even weeks how best to handle this, since I keep reading about not letting the battery completely discharge. Seems there are issues if it drains completely.
I don’t want to disconnect the LiPo from the electron since it is in an enclosure and can’t be reconnected unless taken apart. I do have a connection on the enclosure to run the electron normally by a 9 volt adapter.
Is it best to add code in my app. to check for a low Battery 20-25% and put to sleep until charged back to over 20% by the 9 volt adapter? How long can you do this until complete discharge?
That’s what I did and it worked great for a solar-powered project.
I just ran an if statement to check if the battery SOC was below 20% and if it was I put the Electron into deep sleep mode and then had it check SOC again every hour. If the SOC was above 20% the main code ran normally.
Pretty easy to code.
You could also setup an email or text message alert to let you or them know the battery is low and that it needs charged so they don’t let it go forever before charging the battery back up.
Thanks Scruff… I did see that in a post. I saw in the doc. this statement also:
In all cases, if the wake up time seconds is omitted or 0, the application will keep sleeping until the wakeUpPin triggers (if specified) or the user hits the RESET button.
so I was trying to wake up the electron by using the RESET button once I put it to sleep with
System.sleep(SLEEP_MODE_DEEP, 0);
pushing the reset button I have seems to sometimes work and other times not work.
The reason I’m doing this way is I only have one button on an enclosure which is a reset button and trying to use it as a wake up also after put to sleep.
Reset should always work. If it doesn’t I’d check the button and wiring again.
Maybe you can check the levels on the RST pin before and during the button press.