diff --git a/lib/bluetooth.ts b/lib/bluetooth.ts index 1a98759..9da0e85 100644 --- a/lib/bluetooth.ts +++ b/lib/bluetooth.ts @@ -300,7 +300,7 @@ export class MicrobitWebBluetoothConnection return magnetometerService?.triggerCalibration(); } - async writeUART(data: Uint8Array): Promise { + async uartWrite(data: Uint8Array): Promise { const uartService = await this.connection?.getUARTService(); uartService?.writeData(data); } diff --git a/src/demo.ts b/src/demo.ts index 76a5656..8491eca 100644 --- a/src/demo.ts +++ b/src/demo.ts @@ -333,7 +333,7 @@ const createUARTSection = (): Section => { { onclick: async () => { const encoded = new TextEncoder().encode(dataToWrite); - await bluetoothConnection?.writeUART(encoded); + await bluetoothConnection?.uartWrite(encoded); }, }, "Write to micro:bit",