micro:bit Gateway 1.2 Apk

micro:bit Gateway 1.2 icon
Category: Communication
Requires: Android 5.0 and up
Curent version: 1.2
Updated: 30.12.2020
Price: Free
Size: 0.05 Mb
Download: 78

Rate saved, Thank!

0 (0 votes)

Description of micro:bit Gateway

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();
}

Read more...

Images

Video

Share this App

Also from Ferdinand Stueckler

BLE Numeric Remote 1 Apk

BLE Numeric Remote

Category: Communication
Free
Download Apk
NXT Simple Remote 2.2 Apk

NXT Simple Remote

Category: Communication
Free
Download Apk
Bluetooth Numeric Remote 1 Apk

Bluetooth Numeric Remote

Category: Communication
Free
Download Apk
micro:bit UART Terminal 2.5 Apk

micro:bit UART Terminal

Category: Communication
Free
Download Apk

Similar apps

micro Journal 5.0 Apk

micro Journal

Productivity
Amimetic
0.13 Mb
Download Apk
SMS Gateway Ultimate 2.2 Apk

SMS Gateway Ultimate

Tools
Ice Cold Apps
0.76 Mb
Download Apk
micro MX 1.01 Apk

micro MX

Racing
StudyHall Entertainment
16.39 Mb
Download Apk
Micro Radio Maroc Recorder 7.5 Apk

Micro Radio Maroc Recorder

Music & Audio
Wibelle soft
10.79 Mb
Download Apk
Smash Micro Monster 4.0 Apk

Smash Micro Monster

Action
Cihan Özgür
16.91 Mb
Download Apk
Impossible Run Micro Monster 1.0 Apk

Impossible Run Micro Monster

Action
Cihan Özgür
30.37 Mb
Download Apk
Trend Micro Password Manager 3.5.1096 Apk

Trend Micro Password Manager

Tools
Trend Micro
23.55 Mb
Download Apk
Trend Micro GPS 2015 5.24.0.0 Apk

Trend Micro GPS 2015

Productivity
Trend Micro
9.45 Mb
Download Apk
Trend Micro Things Security 1.5.1012 Apk

Trend Micro Things Security

Tools
Trend Micro
1.74 Mb
Download Apk
Trend Micro MARS Earth 3D 1.0 Apk

Trend Micro MARS Earth 3D

Tools
Trend Micro
2.43 Mb
Download Apk
Micro Battles 3 1.01 Apk

Micro Battles 3

Casual
Donut Games
3.79 Mb
Download Apk
Micro Battles 2 1.02 Apk

Micro Battles 2

Casual
Donut Games
3.01 Mb
Download Apk
Micro Battles 1.02 Apk

Micro Battles

Arcade
Donut Games
3.11 Mb
Download Apk
Micro Pool 1.4 Apk

Micro Pool

Sports
Botond FM Bt.
27.86 Mb
Download Apk
Micro CPU Monitor 3.1.1 Apk

Micro CPU Monitor

Tools
The Big Byte
0.56 Mb
Download Apk
About Privacy Policy Feedback Report a policy violation