Our website uses necessary cookies to enable basic functions and optional cookies to help us to enhance your user experience. Learn more about our cookie policy by clicking "Learn More".
Accept All Only Necessary Cookies
micro:bit Gateway icon

micro:bit Gateway


Ferdinand Stueckler
1.2
  • Jan 22, 2021
    Update date
  • 0/65
    Security
  • Everyone
  • Android 5.0+
    Android OS

About micro:bit Gateway

Bluetooth data exchange for micro:bit devices

This app establishes a channel between two micro:bit devices. The channel will be handeled as UART communication. You have to develope a programm on each micro:bit device with UART transfer.

Indication aktive: BLE Indication (Default)

Indication inaktive: BLE Notification

Silent aktive: No visual logging

Silent inaktive: Logging

Requirements:

- Min. Android 4.4

- Bluetooth Low Energy (BLE)

- Paired devices

- micro:bit programm (developed by yourself)

MBED example:

#include "MicroBit.h"

#include "MicroBitUARTService.h"

MicroBit uBit;

MicroBitUARTService *uart;

int connected = 0;

void onConnected(MicroBitEvent e)

{

uBit.display.scroll("C");

connected = 1;

}

void onDisconnected(MicroBitEvent e)

{

uBit.display.scroll("D");

connected = 0;

}

void onButtonA(MicroBitEvent e)

{

if (connected == 0) {

uBit.display.scroll("NC");

return;

}

uart->send("Yes");

uBit.display.scroll("Y");

}

void onButtonB(MicroBitEvent e)

{

if (connected == 0) {

uBit.display.scroll("NC");

return;

}

uart->send("No");

uBit.display.scroll("N");

}

void onButtonAB(MicroBitEvent e)

{

if (connected == 0) {

uBit.display.scroll("NC");

return;

}

uart->send("SK");

uBit.display.scroll("SK");

}

void processBLEUart() {

uint8_t readBuf[22];

while (1) { // loop for ever

if ((!connected) || (!uart->isReadable())) {

uBit.sleep(50); // wait 50mS and check again

continue; // loop;

}

//else we are connected AND there is some input to read

if (uart->isReadable()) {

while (uart->isReadable()) {

int charCount = uart->read(readBuf, 22, ASYNC);

if (charCount != 0) {

for (int i = 0; i < charCount; i++)

uBit.display.scroll((char) readBuf[i]);

}

}

}

}

}

/*

IMPORTANT !!!

Oherwise you will run out of memory !

Recommend disabling the DFU and Event services in MicroBitConfig.h since they are not needed here:

microbit->microbit-dal->inc->core->MicroBitConfig.h

#define MICROBIT_BLE_DFU_SERVICE 0

#define MICROBIT_BLE_EVENT_SERVICE 0

#define MICROBIT_SD_GATT_TABLE_SIZE 0x500

*/

int main()

{

// Initialise the micro:bit runtime.

uBit.init();

uBit.messageBus.listen(MICROBIT_ID_BLE, MICROBIT_BLE_EVT_CONNECTED, onConnected);

uBit.messageBus.listen(MICROBIT_ID_BLE, MICROBIT_BLE_EVT_DISCONNECTED, onDisconnected);

uBit.messageBus.listen(MICROBIT_ID_BUTTON_A, MICROBIT_BUTTON_EVT_CLICK, onButtonA);

uBit.messageBus.listen(MICROBIT_ID_BUTTON_B, MICROBIT_BUTTON_EVT_CLICK, onButtonB);

uBit.messageBus.listen(MICROBIT_ID_BUTTON_AB, MICROBIT_BUTTON_EVT_CLICK, onButtonAB);

uart = new MicroBitUARTService(*uBit.ble, 32, 32);

uBit.display.scroll("Go");

create_fiber(&processBLEUart); // create fiber and schedule it.

release_fiber();

}

Show More

Additional APP Information

Latest Version

1.2

Uploaded by

Suman Raj Suman Raj

Requires Android

Android 5.0+

Available on

Content Rating

Everyone

Security Report

What's New in the Latest Version 1.2

Last updated on Jan 22, 2021

Android 11

Show More
0/65
Scan Result: Secure
No security vendors flagged this file as malicious
No Virus
No Spyware
No Malware
No Virus
No Spyware
No Malware
Scan Date:Apr 7, 2026
Package Name:com.ble.microbit.gateway
SHA-256:eb6b8c6863800e6a0916ea7ade6d90660463a92033cc402d46d578438b158438
SHA-1:1d530221aaed0eca1d1e9bc57afaaa3594fed2f1
Show More
View Security Report

micro:bit Gateway Screenshots

micro:bit Gateway postermicro:bit Gateway screenshot 1micro:bit Gateway screenshot 2micro:bit Gateway screenshot 3

Related Tags

Popular Articles In Last 24 Hours

Subscribe to APKPure
Be the first to get access to the early release, news, and guides of the best Android games and apps.
No thanks
Sign Up
Subscribed Successfully!
You're now subscribed to APKPure.