Overview

In general, there is no single standard UART profile for Bluetooth Low Energy (BLE), in the same way that there was for Bluetooth Classic. However, the micro:bit does include a Bluetooth UART service that is similar to the Nordic UART service. The micro:bit UART service documentation also consists of a code sample and an accompanying video that utilises the micro:bit Bluetooth UART service in the form of a guessing game.


How to add the micro:bit Bluetooth UART extension in MakeCode 

  1. Open MakeCode and create a new project.
  2. From the Toolbar, select Extensions.
  3. Type 'bluetooth' in the search bar, press return, and add the Bluetooth extension.
  4. Upon adding the Bluetooth extension, you will also need to accept that the radio package will be removed to accommodate the Bluetooth extension, due to the incompatibility between the radio and Bluetooth functionalities.
  5. You can now start to add the UART services from within the Bluetooth Toolbar section. The block to start the 'Bluetooth UART service' is available from the extended (...) menu in the Bluetooth Toolbar blocks section. 


Example Program that uses the micro:bit UART protocol using an Android device.


Here is an example program that uses the micro:bit UART protocol.


This example program can be used with any UART app that follows the micro:bit UART protocol. 

The program was tested on an Android device using the Serial Bluetooth Terminal app.


  1.  Using the micro:bit Android app, pair your micro:bit and download the example MakeCode program.
  2. Open the Serial Bluetooth Terminal app on the Android device.
  3. From the Serial Bluetooth Terminal App menu, select devices and tap on the micro:bit you want to connect to.
  4. Press Button A on the micro:bit to print a message on the serial console.




If you have had success with a different app or other devices, please let us know, and we will include it here.