BBC micro:bit

The BBC micro:bit is a pocket-sized, codable computer that allows anyone to get creative with technology. Made possible through a major partnership with 31 organisations, a micro:bit has been given to every 11 or 12 year old child in year 7 or equivalent across the UK, for free.

The official website for the BBC micro:bit is http://www.microbit.co.uk.

If you're keen to try using the micro:bit with mbed, then start with this platform page to add it to your compiler (on the right hand side), then check out the activity on the micro:bit team page.

If you're new to mbed, there's a video showing your first example here

The BBC micro:bit is based on the mbed HDK. The target MCU is a Nordic nRF51822 with 16K RAM, 256K Flash. As well as the nRF51822 there's also an onboard accelerometer and magnetometer from Freescale.

Pinout

Microbit Pinout

micro:bit Device Abstraction Layer (DAL)

Lancaster University have written a full abstraction of the hardware on the micro:bit, based on mbed. This is used by the higher level languages provided by the BBC and is perfect for creating projects in mbed that use the various pieces of hardware on the micro:bit.

Documentation

Lancaster University have prepared full API documentation and a getting started guide. These live at their own home, hosted from GitHub

If you'd like to use just part of the DAL, the documentation for that is in the advanced guide

There is a set of examples that show how to use the MicroBit class: They can all be found at the micro:bit team, but the simplest is the basic 'hello world'

Import programmicrobit-hello-world

An example of how to use the micro:bit DAL's abstraction for a simple 'Hello World' on the micro:bit display. This is a one-way translation of the microbit-samples repository on GitHub. Please don't try to push changes here, instead push them to the source repo at https://github.com/lancaster-university/microbit-samples

And this example, taken from the advanced guide shows using just the display component:

Import programmicrobit-component-display

Example display component code from http://lancaster-university.github.io/microbit-docs/advanced/#using-components-directly

Getting Started Video

Features

mbed Libraries

The DAL described above contains all code required to use the micro:bit with mbed, but if you're looking to use just the underlying mbed libraries, for example for greater portability to other mbed platforms that don't have the same features as the micro:bit, you can use other libraries directly. For example

For Bluetooth Low Energy, the mbed BLE_API:

Import libraryBLE_API

High level Bluetooth Low Energy API and radio abstraction layer

For more information, see the Bluetooth Low Energy team /teams/Bluetooth-Low-Energy/

Or these component libraries:

Components / MAG3110 Magnetometer
The MAG3110 is a small, low-power digital 3-D magnetic sensor with a wide dynamic range to allow operation in PCBs with high extraneous magnetic fields.
Components / MMA8652 Accelerometer
The MMA8652 is a 12 bit, 3 axis accelerometer

Firmware

You can find the latest firmware at https://www.mbed.com/en/development/hardware/prototyping-production/daplink/daplink-on-kl26z/#Updating_your_DAPLink_firmware

micro:bit availability

The micro:bit is available from a number of different online retailers, and in quantities >90 from CPC in the UK.

More information, including a registration for for schools to request micro:bits can be found here

 Buy Now


Please log in to start a discussion or ask a question.

Discussion topics

TopicRepliesLast post
Troubles about nRF51822 IC 0 16 Nov 2017 by kynix ling
How can I implement a low power wireless receiver with the microbit? 1 23 May 2017 by Chandra Veerappan

Questions

See more related questions