Connection to serial port
A serialport
object represents a serial client for
communication with the serial port. After creating the object, use dot notation to set its
properties.
connects to the serial port specified by s
= serialport(port
,baudrate
)port
with a baud rate of
baudrate
.
connects to the serial port and sets additional properties using optional name-value pair
arguments.s
= serialport(port
,baudrate
,Name,Value
)
, without arguments, connects
to the serial port using the property settings of your last cleared
s
= serialportserialport
object instance. The retained properties are
Port
, BaudRate
,
ByteOrder
, FlowControl
,
StopBits
, DataBits
,
Parity
, Timeout
, and
Terminator
. See Properties.
read | Read data from serial port |
readline | Read line of ASCII string data from serial port |
write | Write data to serial port |
writeline | Write line of ASCII data to serial port |
flush | Clear serial port device buffers |
configureTerminator | Set terminator for ASCII string communication with serial port |
configureCallback | Set callback function and trigger condition for communication with serial port device |
getpinstatus | Get serial pin status |
setRTS | Set serial RTS pin |
setDTR | Set serial DTR pin |