Closed
Description
This simple script should wake up every 10 seconds and print the running time to serial.
from microbit import *
import power
@run_every(s=10)
def print_time():
print(running_time())
while True:
power.deep_sleep(run_every=True)
This is what I get on a random run with v2.1.0-beta.3:
20176
50176
50179
50182
53838
80177
80180
102019
110176
110178
162895
170175
170178
170182
180176
It doesn't seem very predictable, but mostly looks like it misses a lot of the wake up times from the run_every
and double/triple logs the time the next time it wakes up. Running the script next to a stopwatch and the times printed are more or less accurate.
Implementing #118 might also affect this result, but it's a good simple test to run as well while working on that.
Also, at this might be related to some of the CODAL sleep issues, but we need to double check this problem after the CODAL fixes land in the next release.
Metadata
Metadata
Assignees
Labels
No labels