Description
This might be related to this CODAL issue:
However, based on the latest conversations with @JohnVidler we were thinking the issue might be in the MakeCode extension instead of CODAL.
However, in MicroPython executing power.deep_sleep()
doesn't go to sleep either. Having a brief look the MicroPython code I can't see an obvious reason why it might not go to sleep if it's supported within CODAL itself:
micropython-microbit-v2/src/codal_port/modpower.c
Lines 54 to 109 in 2233d79
micropython-microbit-v2/src/codal_app/microbithal.cpp
Lines 130 to 136 in 6ea476f
Example programme to replicate with MicroPython v2.1.0-beta.3:
from microbit import *
import power
while True:
power.deep_sleep()
display.show(Image.SURPRISED)
sleep(500)
This always shows the SURPRISED face and doesn't go to sleep