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)
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)