2017-04-28 10:05:04 +02:00
|
|
|
# Bluetooth On UART Data Received
|
|
|
|
|
|
|
|
Registers an event to be fired when one of the delimiter is matched.
|
|
|
|
|
|
|
|
```sig
|
|
|
|
bluetooth.onUartDataReceived(",", () => {})
|
|
|
|
```
|
|
|
|
|
2017-09-07 22:42:08 +02:00
|
|
|
## Parameters
|
2017-04-28 10:05:04 +02:00
|
|
|
|
|
|
|
* `delimiters` is a [string](/types/string) containing any of the character to match
|
|
|
|
|
2017-09-07 22:42:08 +02:00
|
|
|
## Example
|
2017-04-28 10:05:04 +02:00
|
|
|
|
|
|
|
Read values separated by `,`:
|
|
|
|
|
|
|
|
```blocks
|
|
|
|
bluetooth.onUartDataReceived(serial.delimiters(Delimiters.Comma), () => {
|
|
|
|
basic.showString(serial.readUntil(serial.delimiters(Delimiters.Comma)))
|
|
|
|
})
|
|
|
|
```
|