Skip to content

Getting Started

What you need

  • A BBC micro:bit β€” every project is tested on V2; most also run on V1 (each page says which).
  • A micro-USB cable that carries data, not just power.
  • A computer with a modern browser β€” no installs needed for most projects.

Flash your first program

  1. Open the micro:bit Python Editor.
  2. Replace the starter code with this:

    from microbit import *
    
    while True:
        display.scroll('Hello!')
        display.show(Image.HEART)
        sleep(2000)
    
  3. Plug in the micro:bit and click Send to micro:bit (or Save and drag the .hex file onto the MICROBIT drive).

  4. Watch the LEDs scroll your message. πŸŽ‰

Prefer a desktop editor?

Thonny and Mu both support the micro:bit and give you a REPL to try code line by line.

Copying helper libraries

Many Sensors & Modules projects import a helper file such as servo.py or ultrasonic.py. That file must be on the micro:bit before you run the example:

Click Open…, choose the library .py file and pick Add file β€” then flash as usual. The editor bundles both files into one download.

pip install microfs
ufs put servo.py

Open the library, then File β†’ Save as… β†’ micro:bit and keep the same file name.

micro:bit V1 vs V2

Feature V1 V2
Speaker & microphone β€” βœ…
Data logging (log module) β€” βœ…
Touch-sensitive logo β€” βœ…
More memory for larger programs β€” βœ…

Every example page shows a Board field so you know what will run on your micro:bit.

Next steps

Start with Display Text on the LED Matrix, then work your way through the micro:bit Built-ins before wiring up Sensors & Modules.