pimoroni / pimoroni-pico-rp2350

MicroPython builds for Pimoroni Pico 2 / RP2350 boards.
37 stars 6 forks source link

lightsleep - for info #20

Open ssotheremail opened 2 weeks ago

ssotheremail commented 2 weeks ago

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)