Skip to main content

Microsoft MakeCode

Overview​

Microsoft MakeCode for micro:bit is a free, open source platform for creating projects with the BBC micro:bit.

Connect colour-coded blocks that relate to hardware features and Computer Science fundamentals and switch between blocks, JavaScript and MakeCode Python views. A device simulator shows you what will happen on the physical device before you download your program.

Source​

The source code for the MakeCode for micro:bit target is in the pxt-microbit repository.

This target depends on several other repositories:

Compiler​

MakeCode uses a built-in compiler to translate a project into a .hex file when you select Download.

This has the advantage of not requiring an internet connection in order to code the micro:bit. Once the browser editor at makecode.microbit.org loads, it is cached on your computer.

The MakeCode editors contain a copy of the micro:bit runtime the DAL/CODAL which the blocks and JavaScript APIs reference.

When you press Download the compiler converts the code into a machine readable hex file format.

When this .hex file is flashed onto the MICROBIT drive, the KL26/7 interface processor on the micro:bit copies it into the flash memory inside the nRF application processor and the code runs.

Other features​

MakeCode supports two-way conversion of code, so you can write code as blocks and see what the generated code looks like in JavaScript/MakeCode Python. You can also write JavaScript/MakeCode Python code, and if possible, MakeCode will convert this back into blocks automatically.

MakeCode also allows you to write your own block types and publish them as Extensions.

Offline​

An offline version of the MakeCode editor is available for use in situations where there is limited or no internet connectivity.

Documentation​

Extension authoring​

The editor has built in support for Github authoring. There is a written guide on Creating Extensions within the reference documentation and a video tutorial on YouTube

Tutorial authoring​

Users can publish their own tutorials for simple, guided steps on using MakeCode. Tutorials also support third party extensions.

Community​

There are a variety of ways to get involved and interact: