OPEnSLab-OSU / Loom

Arduino library for Internet of Things Rapid Prototyping in environmental sensing
GNU General Public License v3.0
26 stars 3 forks source link

SD not initializing after waking up from sleep #143

Closed BGoto808 closed 2 years ago

BGoto808 commented 3 years ago

Describe the bug After the Feather goes to sleep, the Feather wakes up and takes data, but none of it is recorded into the SD.

Hardware in Use From BEE222:

To Reproduce Steps to reproduce the behavior:

  1. Create a sketch from basic.ino and include the STEMMA, SD, Interrupt and Sleep Manager in the config
  2. Make sure in loop, the Feather takes data, logs to SD, and goes to sleep

Expected behavior The Feather should wake up as usual and take data and successfully log to SD

Code None

Config None

lucasballr commented 3 years ago

I was able to improve the consistency of the logging by calling Loom.power_up() at the beginning of the sketch loop. This is being done in the hypnos_SD_Sleep.ino example, but only when the board is awoken by the interrupt pin.