boost-movehub
Version:
Connects with your Lego Boost Movehub vie Bluetooth Low Energy (BLE).
18 lines (15 loc) • 377 B
JavaScript
const sinon = require("sinon");
const LEGO_CHARACTERISTIC = "000016241212efde1623785feabcd123";
module.exports = function createCharacteristic() {
return {
uuid: LEGO_CHARACTERISTIC,
dataHandler: null,
on: function(type, cb) {
if (type === "data") {
this.dataHandler = cb;
}
},
subscribe: sinon.spy(),
write: sinon.spy()
};
};