Skip to content

lightsleep - for info #20

@ssotheremail

Description

@ssotheremail

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions