In microbit muPython: sleep(ms), the units is milliseconds.
However, if import time module and use sleep() then muPython uses time module’s sleep(s) which is units of full seconds. Coder must substitute time module’s sleep_ms(ms) to get units of milliseconds.
If using time module, how can I force use of the ‘normal’ sleep(ms)?
Or more generally, how can I specify using any command from the ‘normal’ muPython as opposed to the same-spelled command from an imported module?
# Task: Show SAD, sleep 1 sec, show HAPPY
# Problem: HAPPY takes 17 minutes to appear
from microbit import *
from time import *
display.show(Image.SAD)
sleep(1000) # uses time.sleep(units=sec) so 1,000 sec
display.show(Image.HAPPY)