Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.2k
Closed
Description
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
Code of Conduct
Yes, I agree