pxt-calliope/docs/reference/bluetooth/on-uart-data-received.md
Peli de Halleux 9af989c13c Uartevent (#393)
* support for uart data event

* updated shims
2017-04-28 01:05:04 -07:00

474 B

Bluetooth On UART Data Received

Registers an event to be fired when one of the delimiter is matched.

bluetooth.onUartDataReceived(",", () => {})

Parameters

  • delimiters is a string containing any of the character to match

Example

Read values separated by ,:

bluetooth.onUartDataReceived(serial.delimiters(Delimiters.Comma), () => {
    basic.showString(serial.readUntil(serial.delimiters(Delimiters.Comma)))
})