Approved content
The content below is provided by a partner.
A key-value pair Bluetooth service for BlockyTalky
Click on the gearwheel, then Extensions, search for blockytalky.
This extension uses Bluetooth Low Energy to communicate to other divices. You will need to pair the micro:bit to a device that supports the BlockyTalky bluetooth profile.
blockytalky.sendNumber("temp", input.temperature())
blockytalky.sendString("marco", "polo")
Register an event handler to handler number messages. A number can be integer or double.
blockytalky.onReceivedNumber(function (key, value) {
})
Register an event handler to handler string messages. A number can be integer or double.
blockytalky.onReceivedString(function (key, receivedString) {
})
const BLOCKY_TALKY_SERVICE = '0b78ac2d-fe36-43ac-32d0-a29d8fbe05d6';
const TX_CHARACTERISTIC = '0b78ac2d-fe36-43ac-32d0-a29d8fbe05d7';
const RX_CHARACTERISTIC = '0b78ac2d-fe36-43ac-32d0-a29d8fbe05d8';
MIT
BlockyTalky-BLE=github:LaboratoryForPlayfulComputation/pxt-BlockyTalkyBLE#v0.0.21