Now that deviceOS@1.5.0 is (almost?) here, I have been working to field my first Boron based devices.
First, I build a new carrier board and shared the results here:
Then, I started posting my main counting application over. The biggest adjustment in this effort has been working on low power / sleep. As you all know, the Boron - unlike the Electron - does not have a Real Time Clock. So, I added one to the carrier board based on @rickkas7’s awesome MCP79410RK library and circuit design to control the EN or WKP pin (see carrier board thread).
I started to get overwhelmed by the different ways that the Boron could sleep so, I thought it might be helpful to write a sketch that explored all the different sleep modes and use it to both share what is working and see if anyone can help on the one mode that is not.
The idea is that this sketch runs through five different sleep modes and provides a running tally on successful tests.
Here are the main learnings:
- The System.sleep seems to add a second to the sleep time - not a big deal but a bit surprising
- The Wake on interrupt RISING and FALLING won’t work if you are using a debounced switch. However CHANGE does work. I suspect all would work fine with a digital pin from another device.
- I cannot get the ENABLE pin sleep to work with @rickkas7’s library and circuit. I am quite sure I am doing something wrong but any help here would be appreciated.
Once I get everything working, I plan to measure current draw for each mode.
As always, I hope this is helpful and I would appreciate any comments / suggestions.