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.

What's new in Bluetooth v5.4: An overview

The recent adoption of version 5.4 of the Bluetooth® core specification brings a new…

Low Energy Audio – Incoming Call Over Media (Multi-Device)

This document uses a Message Sequence Chart (MSC) to explain the Bluetooth® LE Audio…

Bluetooth ESL – The Global Standard for the Electronic Shelf Label Market

Electronic shelf label (ESL) systems have historically relied on proprietary protocols for wireless communication,…

Bluetooth® Core Specification Version 5.4 - Technical Overview

This feature overview summarizes and explains the updates introduced in Bluetooth®️ Core Specification Version…

Integrating Memfault with Blecon Bluetooth Devices

In this post, I’ll go through how we evaluated Memfault at Blecon and talk…

Best Practices for Using a Standalone Auracast™ Transmitter

The recently released Auracast™ Simple Transmitter Best Practices Guide describes a typical, qualified implementation…

Auracast™ Broadcast Audio Introduces New Opportunities for Product Developers & Public Locations

Bluetooth® technology recently introduced a new Bluetooth capability, Auracast™ broadcast audio, that will deliver life-changing…

How To Design A Bluetooth LE GATT Server For Your Application

If you want to learn how to create a GATT server and load it…

Introducing: The Bluetooth Low Energy Primer

Bluetooth® technology has been around for more than 20 years. Initially created to allow…

The Bluetooth® Low Energy Primer

Are you new to Bluetooth Low Energy? Learn about its constituent parts, features, and how it works.

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.

How to Do Stuff with Bluetooth® Technology

Got a robot dog you want to remote control? You came to the right…

Bluetooth® Core Specification Version 5.3 Feature Enhancements

Bluetooth® Core Specification version 5.3 includes several feature enhancements with the potential to improve…

Designing and Developing Bluetooth® Internet Gateways

Learn about Bluetooth internet gateways, how to make them secure and scalable, and design and implement your own working prototype gateway and web application for use with either Bluetooth LE Peripherals or with Bluetooth mesh networks.

An Introduction to Bluetooth Low Energy for Swift Developers

All smartphones support Bluetooth® Low Energy (LE) and it is used in all manner…

 Get Help