fixing uarl docs
This commit is contained in:
		| @@ -18,10 +18,9 @@ bluetooth.uartRead(""); | |||||||
| ### Example: Starting the Bluetooth UART service and then reading data received from another device which is terminated by ":" character and then displaying it | ### Example: Starting the Bluetooth UART service and then reading data received from another device which is terminated by ":" character and then displaying it | ||||||
|  |  | ||||||
| ```blocks | ```blocks | ||||||
| let uart_data: string = ""; | let uart_data = ""; | ||||||
| let connected = 0; | let connected = 0; | ||||||
| basic.showString("UART"); | basic.showString("UART"); | ||||||
| bluetooth.startUartService(); |  | ||||||
| bluetooth.onBluetoothConnected(() => { | bluetooth.onBluetoothConnected(() => { | ||||||
|     basic.showString("C"); |     basic.showString("C"); | ||||||
|     connected = 1; |     connected = 1; | ||||||
|   | |||||||
| @@ -27,7 +27,6 @@ bluetooth.onBluetoothDisconnected(() => { | |||||||
|     basic.showString("D"); |     basic.showString("D"); | ||||||
|     connected = 0; |     connected = 0; | ||||||
| }); | }); | ||||||
| bluetooth.startUartService(); |  | ||||||
| input.onButtonPressed(Button.A, () => { | input.onButtonPressed(Button.A, () => { | ||||||
|     if (connected == 1) { |     if (connected == 1) { | ||||||
|         bluetooth.uartWrite("HELLO"); |         bluetooth.uartWrite("HELLO"); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user