Constructor. Creates object with default settings of 9600,8N1. Default is blocking read/write operations
Set the port access mode to NonBlocking(never blocks), TimedImmediately(timer starts immediately), TimedAfterReceive(timer starts after receiving first char), Blocking(blocks forever)
Number of bits per character
Parity of the connection
Number of stop bits per char transmission
Closes the serial port
Opens the serial port with current settings. Throws an exception if the port can't be opened
convenience function. reads a single byte
convenience function. Reads up to data.length bytes
Reads data into the bytes array. Blocks until at least one char has been read.
set blocking mode for operations
Set the options of the port. Is applied immediately if the port is already open
Sets read timeout in millis. On linux only increments of 100ms are available. Timeout maximum is 255000 = 25.5secs
Write bytes to the serial port returns bytes written, Only supports blocking and nonblocking writes. Timed writes are unsupported.
Main class for performing serial port operations