diff --git a/libs/microbit-bluetooth/bluetooth.cpp b/libs/microbit-bluetooth/bluetooth.cpp index ef53a82d..594e5727 100644 --- a/libs/microbit-bluetooth/bluetooth.cpp +++ b/libs/microbit-bluetooth/bluetooth.cpp @@ -21,4 +21,13 @@ namespace bluetooth { void startLEDService() { new MicroBitLEDService(*uBit.ble, uBit.display); } + + /** + * Starts the temperature service + */ + //% help=bluetooth/start-temperature-service + //% blockId=bluetooth_start_temperature_service block="bluetooth temperature service" + void startTemperatureService() { + new MicroBitTemperatureService(*uBit.ble, uBit.thermometer); + } } diff --git a/libs/microbit-bluetooth/shims.d.ts b/libs/microbit-bluetooth/shims.d.ts index e6202248..5e04fdea 100644 --- a/libs/microbit-bluetooth/shims.d.ts +++ b/libs/microbit-bluetooth/shims.d.ts @@ -18,6 +18,13 @@ declare namespace bluetooth { //% help=bluetooth/start-led-service //% blockId=bluetooth_start_led_service block="bluetooth led service" shim=bluetooth::startLEDService function startLEDService(): void; + + /** + * Starts the temperature service + */ + //% help=bluetooth/start-led-service + //% blockId=bluetooth_start_temperature_service block="bluetooth temperature service" shim=bluetooth::startTemperatureService + function startTemperatureService(): void; } // Auto-generated. Do not edit. Really. diff --git a/sim/libmbit.ts b/sim/libmbit.ts index 52dc76dc..4a386ceb 100644 --- a/sim/libmbit.ts +++ b/sim/libmbit.ts @@ -614,6 +614,18 @@ namespace pxsim.pins { } +namespace pxsim.bluetooth { + export function startIOPinService(): void { + // TODO + } + export function startLEDService(): void { + // TODO + } + export function startTemperatureService(): void { + // TODO + } +} + namespace pxsim.images { export function createImage(img: Image) { return img } export function createBigImage(img: Image) { return img }