d4220593b0
* added "serial->on data received" * updated info * updated docs * added readline to read entire buffer * lazy initialize of serial buffers * init async on event * updated docs
608 B
608 B
Serial On Data Received
Registers an event to be fired when one of the delimiter is matched.
serial.onDataReceived(",", () => {})
Parameters
delimiters
is a string containing any of the character to match
Example
Read values separated by ,
:
serial.onDataReceived(serial.delimiters(Delimiters.Comma), () => {
basic.showString(serial.readUntil(serial.delimiters(Delimiters.Comma)))
})