Skip to content

The new micro:bit Python Editor

Quick and easy coding

Makes text-based programming simple for students aged 11-14

a black and white micro:bit on a background of geometric shapes

The new programming tool from the Micro:bit Educational Foundation

The new micro:bit Python Editor is designed to help students who are learning to code using a text-based language. It's full of tools to help you spend more time teaching, from modelling programming tasks to testing and developing code.

Try the new micro:bit Python Editor

The editor is available in Chinese, English, French, Japanese, Korean and Spanish.

Two secondary school students holding micro:bits

High school students learning with the BBC micro:bit

Take your teaching further

The new micro:bit Python Editor is designed to help you deliver your programming fundamentals lessons with the benefits of the micro:bit.

Physical computing with the BBC micro:bit brings technology to life in your students' hands. It takes programming beyond the screen.

The micro:bit is proven to engage students with coding and motivate them to learn more about computer science. The purpose of this new editor is to reduce barriers to learning text-based languages and help you to teach.

Model and test code quickly

The new editor's simulator allows you to model coding tasks to your students using a virtual micro:bit. Students can also use this to test, debug and iterate their program designs before putting their code on a real micro:bit.

Gif showing some example code being tested in the Python Editor Simulator

Using the simulator to test code responds to changes in temperature

Learn and discover programming concepts

The Reference section allows your students to learn programming concepts through short explanations and code snippets they can drag and drop straight into their projects. They can build their understanding by modifying code snippets to fit their own project ideas.

Features

Click on the headings to explore features of the new micro:bit Python Editor designed to give students quicker success with text-based programming:

Drag and drop code examples

Easily discover examples to drag and drop into code.

screen recording showing drag and drop functionality

Code structure & error highlighting

Intuitively learn correct structure and resolve errors.

code structure and error highlighting screen recording

Auto-complete

Discover features, correct syntax, and speed up typing with auto-complete suggestions.

screen recording of autocomplete working

Simulator

Including simulating buttons, gestures, light levels, temperature, compass, sound, radio, serial pins and data logging.

Screen recording of simulator in use

Quick ideas to get started

The Ideas tab has complete working micro:bit projects you can show to your students. Each project has suggestions for customising and improving the code, so you can use these as starting points for coding lessons.

Some of the projects listed in the Ideas section of the new editor

Projects to try out

As well as the Ideas in the editor, there are dozens more quick projects on the micro:bit website available to code in Python. Here are three good ones to try first:

Create an automatic light that turns on when it’s dark.

FAQs

Can I use the Python Editor with both micro:bit V1 and V2?

The micro:bit Python Editor works with both the micro:bit V1 and the V2 with built-in speaker. The simulator shows a micro:bit V2, so if you are using a micro:bit V1 do be aware that some code may work on the simulator but not on your physical micro:bit. Code that will only work on a micro:bit V2 is labelled 'V2' in the Reference section.

Can I use the micro:bit Python Editor offline?

You need an internet connection and a web browser to load the editor. Once loaded it will continue to work, even if your internet connection becomes unstable.

How do I save projects to return to edit later?

Students can save their code to their local computer using the 'Save' button. This will save a HEX file to their downloads folder but they can then move it wherever they wish (e.g. to their school cloud storage). Just use the 'Open' button to return to the project later. Code can also be saved/opened as Python text files if preferred.

Visit our support site for further information.

Can I use the new Python Editor with micro:bit classroom?

Yes, the new Python Editor is available within micro:bit classroom, the free tool for managing live coding lessons and saving a whole class's code at the push of a button.

Can I use accessories within the new Python Editor?

Yes, if the accessory manufacturer has provided a Python module as a .py file you can open this as a new file in the Projects section (be sure to use the cog on the right to open it as a new file rather than to replace your main file). You can then import the functions from the module into your main code.

Visit our support site for further information.

Can I still use the old editor?

Yes, you can still access the old micro:bit Python Editor at https://python.microbit.org/v/2. It will be continue to be available at least until September 2023.

Try the new micro:bit Python Editor