Demo send & receive data with micro:bit Web Bluetooth UART service.
I created a simple demo to send and receive data with m:bit UART service. The code is purely written in the JavaScript block PXT editor and the HTML5 app for the web bluetooth app running on Chrome browser.
Source code: https://github.com/ferrygun/micro-bit-WebBluetooth-UART/tree/master
More details on the UART service can be found on the following link: https://lancaster-university.github.io/microbit-docs/ble/uart-service/ The code is based on the: https://github.com/LaboratoryForPlayfulComputation/microbit-web-bluetooth
Open this page at https://randosy.github.io/micro-bit-webbluetooth-uart/
This repository can be added as an extension in MakeCode.
- open https://makecode.microbit.org/
- click on New Project
- click on Extensions under the gearwheel menu
- search for https://github.com/randosy/micro-bit-webbluetooth-uart and import
To edit this repository in MakeCode.
- open https://makecode.microbit.org/
- click on Import then click on Import URL
- paste https://github.com/randosy/micro-bit-webbluetooth-uart and click import
This image shows the blocks code from the last commit in master. This image may take a few minutes to refresh.
- for PXT/microbit