The Story So Far

In Part 1 of my BBC micro:bit series, I explained the background of the BBC micro:bit, a remarkable programmable device which will inspire school children to get creative with coding and making things. I also shared a quick look at its architecture and main features.  In Part 2, I gave a guided tour of the micro:bit’s default Bluetooth® profile. In this final blog post, I’ll be examining ways in which you can create code for the micro:bit, and how you can write code for other devices which allow them to interact with the micro:bit over Bluetooth.

Take Your Pick

One of the things I think sets the micro:bit apart from other comparable devices for the education sector is the fact there’s a significant collection of tools and languages available to the budding programmer. The fact that this has been accomplished in such a short time is testimony to the level of support there is out there from all sorts of organisations and technical communities.

There are several development tools for the complete beginner and I’ll discuss them next. But there are also approaches to developing for micro:bit which, coupled with the fact that its runtime is open source, mean you can get in very deep and learn anything and everything about what makes this device tick. There’s a joke about timers in there somewhere. I’ll leave that one to you.

This means the barrier to entry for becoming a micro:bit developer is very low but the ceiling governing how much you can learn is very high. Want to know how multiplexing and persistance of vision is used to make the micro:bit 5 x 5 LED display work? It’s all there in the runtime code and it’s described in Lancaster University’s excellent documentation.

Development Tools for Beginners

The BBC provided a collection of online development tools for beginners. I’ll discuss them shortly. Since the BBC’s site was launched, Microsoft has been busy creating their own micro:bit development site and I’ve been working with them to provide comprehensive capabilities for developers who want to make use of Bluetooth on the micro:bit.

The new Microsoft site is and, in my opinion, it is by far the best of the online micro:bit development tools for beginners and the best tool if you want full access to the micro:bit’s Bluetooth profile.

It provides a visual programming, drag-and-drop tool involving building application logic by arranging graphical programming blocks representing predefined, parameterised functions. And it’s very easy to use.

To use Bluetooth in your micro:bit application you first need to add the Bluetooth package to your project using the menu More/Add Package.

Figure 1 – Adding the Bluetooth® Package to a codethemicrobit Project

Once this is done, you have a complete collection of Bluetooth related ‘blocks’ with which to build the Bluetooth capabilities of your application. Many are very simple and merely result in a given Bluetooth service being available at run-time. But there are also blocks which provide access to Bluetooth connect and disconnect events and the Bluetooth UART service can be used to transmit arbitrary data to a connected peer or to receive data from a peer device.

Figure 2 – The codethemicrobit Bluetooth Package

If you read part 2 of my micro:bit blog series you’ll probably spot that there are a few services missing from the list of blocks above. For historical reasons relating to the BBC requirements, the Device Information, DFU and Event services are currently included automatically as long as you use at least one of the other services from the Bluetooth blocks shown above. We still have some work to do and the aim is for all Bluetooth services to have their own blocks in the Bluetooth package so that you have complete control over exactly what Bluetooth capabilities your micro:bit code has.

To illustrate the power of, here’s an application which implements the micro:bit side of my Animal Vegetable Mineral guessing game which you can see on our micro:bit page or in YouTube. It took only 10 minutes to create.

Figure 3 – micro:bit Animal, Vegetable, Mineral Guessing Game

I think Microsoft’s is just fantastic and the team behind it has done an amazing job. It’s easy and it’s flexible, most importantly, for Bluetooth® developers there are only a few constraints regarding what you can or cannot do.


An Introduction to Bluetooth Low Energy Development

This self-study educational resource covers both theory and practice of Bluetooth Low Energy GAP and GATT application development. The guide will equip you with a solid understanding of key Bluetooth Low Energy concepts before guiding you through a series of software development projects that will allow you to put the theory into practice.


The BBC’s online tools for the beginner are all available at . Two are from Microsoft and are called “Blocks” and “Touch Develop” (or “TD” for short). The third is from a company called Code Kingdom and I’m informed it sits on top of Microsoft’s TD APIs.

All three of these tools are suitable for beginners. Blocks is similar to Microsoft’s tool at but does have a number of limitations, including with respect to Bluetooth.

Figure 4 – The Microsoft Block Editor

TD and the Code Kingdom editors use scripting but within what I can only describe as an intelligent user interface which guides and assists. They best way to get a feel for this is to give it a try.

Figure 5 – Touch Develop and the Code Kingdoms Editors Side by Side

Even with these three tools for beginners you can create Bluetooth applications. You are limited to a range of predefined use cases designed to be used in conjunction with the official micro:bit Android application from Samsung but you can still do some very cool things. These limitations were implemented to ensure things stay as simple as possible for the novice developer whilst introducing them to the world of wireless communications. There are other tools for those who want to do more and I’ll cover those shortly.

The Samsung Android application allows developers to write code and flash it over Bluetooth® to their micro:bit all without touching a PC of any sort. You can code on your phone or tablet which is a fantastic capability. Microsoft’s Blocks’ editor seems particularly well suited for this. Here’s a video of me programming my micro:bit to be a music player Bluetooth remote control. Watch just how easy and gratifying this is.

Bluetooth Mesh 1.1 Performance

In this blog, we explore different performance capabilities of the Bluetooth Mesh 1.1 network…

Bluetooth® Channel Sounding: A Technical Overview

The forthcoming update to the Bluetooth® core specification adds a new feature called Channel…

The Bluetooth® Mesh Primer

An introduction and explanation of important Bluetooth® Mesh concepts.

Low Energy Audio – Basic One-Way Unicast Audio

This document gives an introduction to Bluetooth LE Audio by explaining the basics of…

Low Energy Audio – Using UCIs, URIs, and URI Schemes

This document describes how implementers can use the UCIs, URIs, and URI schemes in…

Using a Bluetooth LE Wireless Module to Accelerate Time-to-market

Wireless connectivity makes dumb products intelligent. Smart devices can transmit information about their surroundings…

Enabling the Digital Transformation of Industrial IoT with Bluetooth®

The Industrial IoT is a digital transformation process for enterprises offering them compelling abilities…

Now Available: Auracast™ Developer Best Practice Guides公開中:Auracast™開発者向けベストプラクティスガイド

When Bluetooth® LE Audio was released, it introduced broadcast audio to Bluetooth technology. This…

Automated Emergency Light Testing Through Bluetooth Mesh

During a summer internship at Nordic, I took on a project that focused on…

Bluetooth Low Energy Fundamentals

The Bluetooth Low Energy (LE) Fundamentals Course is designed to give you the knowledge…

The Latest in HADM with Bluetooth LE

HADM, or high accuracy distance measurement using Bluetooth does exactly what it says –…

Bluetooth® Technology for Linux Developers

Learn how to use the interprocess communication system D-Bus and the BlueZ APIs to create Bluetooth applications for Linux computers.

Designing and Developing Bluetooth® Internet Gateways

Learn about Bluetooth® internet gateways, how to make them secure and scalable, and design and implement your own...

The Bluetooth LE Security Study Guide

Learn about fundamental security concepts, the security features of Bluetooth Low Energy, and gain some hands-on experience using those features in device code.

 Get Help