1. Introduction

1.1. PC-Microbit

These docs will help you code your microbit using micropython.
Micropython is a version of python for running on small devices like the microbit.
../_images/microbit_happy.png

1.2. Home pages:


1.3. Key microbit references:


1.4. Microbit software using micropython:

Comparison of microbit programming options:
The standard online micropython editor: https://python.microbit.org/v3.
The Mu editor for laptops, https://codewith.mu/en/tutorials/1.1/microbit, is a simple editor but is out of date and behind the standard online editor .

Warning

As of Sep 2022, Mu v1.1.1 uses micropython 1.15 and so doesn’t support some newer features.
The micropython online editor uses micropython 1.18.
Thonny v4 uses micropython 1.18.
When flashing from the online editor the micropython will be flashed as well.
Thonny for laptops, can be downloaded from https://thonny.org/.
../_images/thonny_install_micropython.jpg
Edublocks, https://app.edublocks.org/#MicroBit, is an online editor with both blocky code and micropython, and can display the block code and micropython code side by side.

1.5. Micropython simulator:

https://python.microbit.org/v/3 uses the latest micropython for the latest version of the microbit.
Create with code UK, https://create.withcode.uk/, works with standard python or micropython. Starting the code with “from microbit import /*” will pop up the simulator when the code is run.

1.6. Blocky code simulator:

The Makecode website https://makecode.microbit.org/ allows blocky code use, but it has its own unique version of micropython based on its own translation of the typescript code that it uses, and so it will not work with the standard online micropython editor. It has an excellent simulator and vast extensions library for exploring other devices that can be connected to the microbit.


1.7. Out of Box hex file v2

The hex file that is on new microbits can be found at: https://microbit.org/get-started/user-guide/out-of-box-experience/


1.8. Firmware

See: https://microbit.org/get-started/user-guide/firmware/


1.9. Sleep, Power off, wake

See: https://support.microbit.org/support/solutions/articles/19000120358-how-do-i-power-off-or-put-the-micro-bit-to-sleep-


1.10. Useful sites:


For beginners, using blocky code, these sites may be useful:


1.11. Python references:

For an introduction to python see:


Tip

If you are using a track-pad, navigate to various sections and pages by clicking on the same heading in the left sidebar twice, then use the arrow keys to move up and down.