Tutorials and Sample Code

Need help getting started? Check out our list of recommended tools.

bitty data logger

Use your tablet or phone to capture and chart motion data from your micro:bit.

The associated micro:bit coding tutorial will teach you how to use Bluetooth to send accelerometer data from the micro:bit to a connected phone.

What's your favourite tool? MakeCode or C/C++?

C/C++

MakeCode Coding Tutorial

C/C++ Coding Tutorial

Note: if C/C++ is your thing, we do assume you already have at least a basic knowledge of the programming language.

bitty controller

Remote control micro:bit connected devices using the bitty controller app on your smartphone or tablet.

In theory you can control anything your micro:bit can control but the micro:bit code will vary depending on what it's controlling. So we've created example code using both Microsoft MakeCode and C/C++ for several of the popular kits you can buy.

What do you want to control?

Our code samples and tutorials illustrate the key coding techniques needed to control micro:bit connected things over Bluetooth. After reviewing any of them, you should be able to adapt the code and use the things you've learned to create the micro:bit code for other products.

Coding for Kitronik Products

Coding for 4tronix Products

bitty audio prank

With the 'bitty audio prank' app on your smartphone or tablet you can make it emit surprising and funny sounds just by pressing buttons on your micro:bit in various ways. Communication between the micro:bit and smartphone is wireless using Bluetooth so you could hide your smartphone in a room and have fun watching friends and family react when they hear unexpected sounds coming from unlikely places :-)

The associated micro:bit coding tutorial will teach you how to respond to buttons being pressed, about micro:bit "events" and about the micro:bit Bluetooth "event service".

What's your favourite tool? MakeCode or C/C++?

C/C++

MakeCode Coding Tutorial

C/C++ Coding Tutorial

Note: if C/C++ is your thing, we do assume you already have at least a basic knowledge of the programming language.

bitty mood lighting

Use your tablet or phone to create 'mood lighting' for your room. Use your micro:bit to select and save the colour of your choice. There's no need to get out of bed unnecessarily, is there?

The associated micro:bit coding tutorial will teach you how to use Bluetooth "events" to send data from the micro:bit to a connected phone, how to respond to the micro:bit buttons and how to run code in the background.

What's your favourite tool? MakeCode or C/C++?

C/C++

MakeCode Coding Tutorial

C/C++ Coding Tutorial

Note: if C/C++ is your thing, we do assume you already have at least a basic knowledge of the programming language.

bitty xmas bauble

Liven up your Xmas tree!

The Bitty Xmas Bauble micro:bit code contains some advanced concepts

C/C++

MakeCode Coding Tutorial - not available

This is a more advanced micro:bit coding challenge best approached in C/C++

C/C++ Coding Tutorial

Note: if C/C++ is your thing, we do assume you already have at least a basic knowledge of the programming language.

bitty blue

Play with Bluetooth on your micro:bit

Not a tutorial as such.... just the code

C/C++

MakeCode solution

C/C++ solution

Note: if C/C++ is your thing, we do assume you already have at least a basic knowledge of the programming language.

microbit blue

Play with Bluetooth on your micro:bit

C/C++

Temperature Alarm

No C/C++ tutorials for micro:bit blue

Note: if C/C++ is your thing, we do assume you already have at least a basic knowledge of the programming language.