Bridging between micro:bit and Scratch 1.4 via BLE (Bluetooth Low Energy) using Remote Sensors Protocol.
Based on the work of Alessio Ciregia (https://github.com/alcir/microbit-ble).
- Raspberry Pi 1 Model B with
- Bluetooth dongle BT-Micro4
- Raspbian Stretch
- ThinkPad X40
- Bluetooth dongle BT-Micro4
- Lubuntu 18.04
Note that the accelerometer value notification and the gesture notification are mutually exclusive. To get the accelerometer values, you must add the bluetooth accelerometer service block. To get the gestures, you must remove the bluetooth accelerometer service block.
Note that the variable light-level-period
needs to be global ("For all sprites").
Run after enabling remote sensors on Scratch.
$ python microbit-to-scratch-via-ble.py XX:XX:XX:XX:XX:XX
(XX:XX:XX:XX:XX:XX is the device address of your micro:bit.)
- These derivative works are placed in the public domain.
- There's no warranty.