BBC micro:bit MicroPython documentation

Welcome!

The BBC micro:bit is a small computing device for children. One of the languages it understands is the popular Python programming language. The version of Python that runs on the BBC micro:bit is called MicroPython.

This documentation includes lessons for teachers and API documentation for developers (check out the index on the left). We hope you enjoy developing for the BBC micro:bit using MicroPython.

Note

The BBC micro:bit MicroPython documentation contains information for all versions of the micro:bit board. Where functionality is applicable only to the latest device, you will see a note or comment marking this as V2.

If you’re a new programmer, teacher or unsure where to start, begin with the Tutorials and use the micro:bit Python Editor to program the micro:bit.

Note

The MicroPython API will not work in the MakeCode editor, as this uses a different version of Python.

_images/comic.png

Projects related to MicroPython on the BBC micro:bit include:

  • micro:bit Python Editor - A simple browser-based code editor, developed by the Micro:bit Educational Foundation and designed to help teachers and learners get the most out of text-based programming on the micro:bit.

  • Mu - A simple offline code editor for kids, teachers and beginner programmers.

  • uFlash - A command line tool for flashing raw Python scripts onto a BBC micro:bit.