Bluetooth UART

The main chip has a bluetooth LE radio built in, which is how you can make cool wireless projects!

You can use the radio with our Adafruit Bluefruit Connect app without too much difficulty! You can download Bluefruit Connect in both the iOS App store and Android app stores

Learn more about our app over at the Connect guide, we'll assume you've read thru it so you have a rough idea how it works

Install Library & Example Code

First up, install the Adafruit helper library and friends

You can find our BLE demos in the examples menu:

Load up the BLE UART demo to start

Find these three lines:

  forward();
  //loopback();
  //spam();

and change them to:

//forward();
loopback();
spam();

This will turn on auto-transmitting data once a second which will make testing easier. Then upload the sketch

Bluetooth Connection

Once you have the sketch on the microbit, open up the Adafruit Bluefruit Connect app.

On the left there's a menu you can open. Select the microbit, it might be named UART or Arduino

Press Connect

Then select UART from the list of Modules. Go into Timestamp mode and you should see messages once a second:

Go back to the sketch and change it back to:

  forward();
  //loopback();
  //spam();

Re-upload. The app will complain you disconnected, just go back and disconnect from the peripheral-list menu.

Open the serial console at 115200 baud

Then when you go back to UART mode, you can send data from the tablet to the bit and back. Note that the microbit's UART is a little odd - don't send more than 10 or so characters 'at a time' through the serial monitor or it may hang.

Once you've got all that working, you can try our controller sketch!

Last updated on 2017-09-27 at 01.05.00 PM Published on 2017-09-27 at 01.15.13 PM