6 years, 5 months ago.

BBC Micro:bit how to use the radio

The example programs simple-radio-tx and simple-radio-rx do not work on the BBC Micro:bit using the Mbed online C/C++ compiler. The same code does work with the yotta offline compiler.

I figured out why and how to fix this. The config.json file which tells the compiler to turn off the Bluetooth functionality is being ignored.

Place the line:

  1. define MICROBIT_BLE_ENABLED 0 in the MicroBit.h library and forget about the config.json file.

Thanks Matthew, I'll make sure this is fixed upstream.

posted by Jan Jongboom 27 Nov 2017

Thank You Matthew ! Now the simple radio tests of Lancaster University are functioning .

posted by Jeronimo Avelar Filho 09 Dec 2017

Glad it helped. I later found that you can use mbed_app.json, instead of config.json via:

{ "macros": [ "MICROBIT_BLE_ENABLED=0" ] }

Please see: https://stackoverflow.com/questions/47580207/using-config-json-file-with-bbc-microbit-mbed-online-compiler

posted by matthew oppenheim 11 Dec 2017

Hello, just started working with Micro:bit with my son. Built the simple-tx, and I see it is supposed to send a character message when a button is pushed. What device can receive the message? Do we need an open app on an Android phone that can receive the messages? ...this is like Hello World but nobody is listening :) I tried the nRF Connect app but could not figure anything out.

posted by A Dub 23 May 2018

The examples discussed here are for Micro:bit to Micro:bit communication using the custom radio stack, not using Bluetooth. To communicate with an Android phone you need to pair it using the Bluetooth radio. Have a look on YouTube for videos on pairing the Micro:bit with an Android phone and take it from there.

posted by matthew oppenheim 23 May 2018
Be the first to answer this question.