Can't upload to device after Deep Sleep
Posted: Sun Jul 25, 2021 11:33 pm
I have a program that just prints "Hi" using I can run this over and over. When I add deep sleep using this code:
I'm no longer able to upload to the device. I usually have to reflash it. I've also tried using rshell that doesn't work either. It just keeps trying to connect. Am I doing something wrong or is there a way to stop deep sleep so I can upload?
Code: Select all
ampy --port COM15 run something.py
Code: Select all
import machine
print("Hi")
rtc = machine.RTC()
rtc.irq(trigger=rtc.ALARM0, wake=machine.DEEPSLEEP)
rtc.alarm(rtc.ALARM0, 3000)
machine.deepsleep()