Serial

Serial

Constructor

new Serial()

Creates an instance of Serial.

Methods

(async) begin(bropt)

Request to open serial port

Parameters:
NameTypeAttributesDefaultDescription
brint<optional>
9600

br - baud rate

(async) close()

Close serial port

gotByte(value)

This method is called when a single value is received.

Parameters:
NameTypeDescription
valueint

gotBytes(values)

This method is called when multiple values are received.

Parameters:
NameTypeDescription
valuesarray

gotCSV(array)

This method is called when a CSV string is received.

Parameters:
NameTypeDescription
arrayarray

(async) print(values)

Parameters:
NameTypeDescription
valuesstring

(async) println(values)

Parameters:
NameTypeDescription
valuesstring

(async) write(value)

Parameters:
NameTypeDescription
valueint

(async) writeByte(value)

Parameters:
NameTypeDescription
valueint