Microbit Module¶
The microbit
module gives you access to all the hardware that is built-in
into your board.
Functions¶
-
microbit.
panic
(n)¶ Enter a panic mode. Requires restart. Pass in an arbitrary integer <= 255 to indicate a status:
microbit.panic(255)
-
microbit.
reset
()¶ Restart the board.
-
microbit.
sleep
(n)¶ Wait for
n
milliseconds. One second is 1000 milliseconds, so:microbit.sleep(1000)
will pause the execution for one second.
n
can be an integer or a floating point number.
-
microbit.
running_time
()¶ Return the number of milliseconds since the board was switched on or restarted.
-
microbit.
temperature
()¶ Return the temperature of the micro:bit in degrees Celcius.