Serial
Reading and writing data over a serial connection.
Read
serial.readUntil(Delimiters.NewLine);
serial.readLine();
serial.readString();
serial.readBuffer();
Write
serial.writeLine("");
serial.writeNumber(0);
serial.writeValue("x", 0);
serial.writeString("");
serial.writeBuffer(null);
Events
serial.onDelimiterReceived(Delimiters.NewLine, function () {})
serial.onEvent(SerialEvent.DataReceived, function () {})
Configuration
serial.setRxBufferSize(64);
serial.setTxBufferSize(64);
serial.redirect
serial.setBaudRate(BaudRate.BaudRate115200)
serial.redirect(null, null, BaudRate.BaudRate115200)
serial.attachToConsole()
Advanced
serial.createSerial(undefined, undefined);
See Also
read until, read line, read string, read buffer, write line, write string, write number, write value, write buffer, on event, on delimiter received, set rx buffer size, set tx buffer size, set baud rate, redirect, attach to console, create serial
serial