Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

lightsleep(n) returns immediately on pico-w or pico with network imported #17204

Closed
@phdussud

Description

@phdussud

Port, board and/or hardware

pico and pico-w

MicroPython version

MicroPython v1.25.0 on 2025-04-15; Raspberry Pi Pico W with RP2040

Reproduction

copy paste this code:

# light_sleep_test.pyfrom machine import lightsleepfrom time import sleep_ms, ticks_ms, ticks_diffdef test(n):    for i in range(n):        t0 = ticks_ms()        sleep_ms(50)        lightsleep(5000)        sleep_ms(50)        print(i, ticks_diff(ticks_ms(), t0))test(10)

Expected behaviour

If the test works it should print
0 5101
1 5101
2 5101
3 5101
4 5101
5 5101
6 5101
7 5100
8 5101
9 5100

Observed behaviour

Instead it prints:
0 142
1 127
2 127
3 128
4 129
5 127
6 128
7 128
8 128
9 128

Additional Information

Seediscussion here

Code of Conduct

Yes, I agree

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp