# data[].attributes.body
from microbit import *

while True:
    pin0.write_digital(1)
    sleep(1000)
    pin0.write_digital(0)
    sleep(1000)

# data[].attributes.headline
Jonathan's Name tag with Music (Python or Blocks)

# data[].attributes.subject
Jonathan's Name tag with Music (Python or Blocks)

# data[].attributes.body
from microbit import *
import music

while True:
display.scroll('Jon')
display.show(Image.COW)
music.play(music.DADADADUM)

# data[].attributes.body
from microbit import *

while True:
display.scroll('Jon')
display.show(Image.COW)

# data[].attributes.body
(Python)

# data[].attributes.attachment_link.title
Music - BBC micro:bit MicroPython 0.0.1 documentation

# data[].attributes.attachment_link.description
MicroPython on the BBC micro:bit comes with a powerful music and sound module. It's very easy to generate bleeps and bloops from the device if you attach a speaker. Use crocodile clips to attach pin 0 and GND to the positive and negative inputs on the speaker - it doesn't matter which way round they are connected to the speaker.

# data[].attributes.attachment_link.title
Images - BBC micro:bit MicroPython 0.0.1 documentation

# data[].attributes.attachment_link.description
MicroPython is about as good at art as you can be if the only thing you have is a 5x5 grid of red LEDs (light emitting diodes - the things that light up on the front of the device). MicroPython gives you quite a lot of control over the display so you can create all sorts of interesting effects.

# data[].attributes.attachment_link.readable_text
Microsoft MakeCode

Microsoft's MakeCode editor is the perfect way to start programming and get creating with the BBC micro:bit. The colour-coded blocks are familiar to anyone who's previously used Scratch, and yet powerful enough to access all the features of this tiny computer. You can also switch to JavaScript to see the text-based code behind the blocks.

Our getting started pages will guide you through your first steps.

You can find out more about requirements for using the MakeCode editor in the classroom in the MakeCode FAQ.

Python

Python is a great way to deepen your programming skills through text-based coding. Its natural English-like structure makes it easy to start learning, but it's also powerful enough to be used in areas like data science and machine learning.

It's widely used in schools and is supported by a global community of teachers, programmers and engineers. Our Python editor is designed to help teachers and learners get the most out of text-based programming on the micro:bit.

Mobile and tablet apps

If you're using mobile devices like phones or tablets we have iOS and Android apps that let you program your micro:bit using MakeCode. Code is transferred from your mobile device to the micro:bit using a Bluetooth radio connection, so no data cables are needed.

Scratch

Scratch is loved by children and adults the world over. For many, Scratch is their first introduction to programming from around age 8 and up.

You can integrate micro:bit into your Scratch projects, turning your micro:bit into a physical game controller, paintbrush, digital scoreboard or more. You'll need a Windows or macOS (version 10/11) computer with Bluetooth and Scratch Link installed or a Chromebook or mobile device to install the Android app. You can then follow the links below to get started or explore our Scratch projects.

Swift Playgrounds

If you have an Apple iPad or Mac computer with macOS 10.15.3 or later, you can explore the Swift programming language with our Swift Playgrounds interactive book.

Other editors

There's a huge community of people making tools for programming and interacting with the micro:bit which means you can program your micro:bit in Python, C++ and other languages, including other block editors.

The editors listed below are not officially supported by the Micro:bit Educational Foundation, so please look for the 'support' details in the editors themselves for any questions.

# data[].attributes.attachment_link.description
Choosing the right code editor for the BBC micro:bit, the pocket-sized computer transforming digital skills learning.