This repository contains examples of using Web Bluetooth with micro:bit.
Scan Bluetooth devices whose name starts with "BBC micro:bit". After connecting to a micro:bit via BLE, it prints all the available services and characteristics.
Scan Bluetooth devices whose name starts with "BBC micro:bit". After connecting to a micro:bit via BLE, it allows to interact with the micro:bit through its Bluetooth Temperature service.
- Temperature: notify temperature data in degrees Celsius.
- Temperature Period: read or write the frequency with which temperature data is reported in milliseconds.
Scan Bluetooth devices whose name starts with "BBC micro:bit". After connecting to a micro:bit via BLE, it allows to interact with the micro:bit through its Bluetooth UART service.
- TX: indicate the string (micro:bit transmits and browser receives through WebBLE).
- RX: write the string (micro:bit receives and browser transmits through WebBLE).
Scan Bluetooth devices whose name starts with "BBC micro:bit". After connecting to a micro:bit via BLE, it allows to interact with the micro:bit through its Bluetooth LED service.
- LED Matrix State: read or write the state of the 5x5 LED matrix.
- LED Text: write a text to be displayed in the LED matrix.
- Scrolling Delay : read or write the delay in milliseconds for scrolling the text.
Scan Bluetooth devices whose name starts with "BBC micro:bit". After connecting to a micro:bit via BLE, it allows to interact with the micro:bit through its Bluetooth Button service.
- Button A State: notify state of button A (0=not pressed, 1=short pressed, 2=long pressed).
- Button B State: notify state of button B (0=not pressed, 1=short pressed, 2=long pressed).
Scan Bluetooth devices whose name starts with "BBC micro:bit". After connecting to a micro:bit via BLE, it allows to interact with the micro:bit through its Bluetooth Accelerometer service.
- Accelerometer Data: notify accelerometer data of axes x, y and z.
- Accelerometer Period: read or write the frequency with which accelerometer data is reported in milliseconds.
Scan Bluetooth devices whose name starts with "BBC micro:bit". After connecting to a micro:bit via BLE, it allows to interact with the micro:bit through its Bluetooth Magnetometer service.
- Magnetometer Data: notify magnetometer data of axes x, y and z.
- Magnetometer Period: read or write the frequency with which magnetometer data is reported in milliseconds.
- Magnetometer Bearing: notify the compass bearing in degrees from north.
- Magnetometer Calibration: notify or write the calibration state (0=state unknown, 1=calibration requested, 2=calibration completed OK, 3=calibration completed with error).