-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lightsleep - for info #20
Comments
As far as I can see in 0.0.11 lightsleep(2500) does not wake up at all, whereas it did in 0.0.9 |
I guess the filesystems are far enough apart to miss each other, oof. We use a 2MB/2MB split and the officially unofficial image split is still... undecided maybe... We're still building from unmerged, unreleased changes so all bets are off until all this chaos is merged down into mainline MicroPython. Bear with us! |
Thanks for all your work, and the reply. At least my battery powered project is working pretty well with its Pico 2 and brilliant Pico Inky Pack, so its hardly a crisis, but if the sleeps/timers etc were sorted then the battery life would be a lot better than its is..... I don't envy the people trying to fix these issues, I am struggling to understand how, for example, in mainline micropython: for y in range(0,5): with the code as is with sleep(2.5) the following lightsleep produces no or a tiny delay and the loop takes about 2.5sec, whereas if you comment the sleep and uncomment the adjacent lightsleep you get a 5 sec loop! Good grief. |
Looks like this - or some flavour of it - is reported upstream too - micropython/micropython#16181 IIRC there were patches related to sleep as part of the Pico W patchset too, which might be what's getting pulled in here - micropython/micropython#16057 |
I put this comment on the Micropython github. It is also (perhaps unsurprisingly) on 0.0.9:
For me its ok as is with standard 1.24.0 on pico 1. On a Pico 2 the 1st lightsleep does not work. if I comment out the time.sleep(0.1) in the example below, then both lightsleeps work fine. Hope this helps pin it down.
import machine
import time
led = machine.Pin("LED", machine.Pin.OUT)
led.off()
while True:
led.on()
time.sleep(0.1)
machine.lightsleep(10000)
led.off()
machine.lightsleep(10000)
The text was updated successfully, but these errors were encountered: