Open
Description
CircuitPython version
Adafruit CircuitPython 9.2.1 on 2024-11-20; Adafruit Metro ESP32S3 with ESP32S3
Code/REPL
from alarm import exit_and_deep_sleep_until_alarms
from alarm.time import TimeAlarm
from time import monotonic
def main():
# This will run each time the board wakes from deep sleep.
print("I woke up")
seconds = 8
ta = TimeAlarm(monotonic_time=monotonic() + seconds)
exit_and_deep_sleep_until_alarms(ta)
main()
Behavior
Steps to reproduce the problem:
- Run the code above as code.py on a Metro ESP32-S3 with charged battery pack connected (I suspect this might act the same for any S2 or S3 board with battery power, but I haven't tried it)
- In macOS, eject the CIRCUITPY drive (unmount for linux, etc)
- Unplug the USB cable, leaving the board powered by its battery
- Plug the USB port back in
After re-connecting the USB cable, the CIRCUITPY never shows up, and the USB serial device never shows up.
Description
If I reset the board, everything goes back to normal with CIRCUITPY and USB serial. But, I really don't want to reset the board because I'm trying to make a low cost data logger that uses alarm.sleep_memory
instead of an SD card. A reset will clear the sleep memory, erasing the measurements.
Assuming I can get it working, my intended use case is:
- Plug in the board to charge the battery, set the clock, and start recording measurements
- Unplug the board, seal it up in a case, and move it to the location I want to monitor
- Wait a while
- Get the board, open the case, plug it back in, and dump the data over the serial port
Additional information
No response