serialdev
Connection to serial device on Raspberry Pi hardware
Add-On Required: This feature requires the MATLAB Support Package for Raspberry Pi Hardware add-on.
Description
This object represents a connection from the MATLAB® software to a serial device on the Raspberry Pi® hardware. To exchange data with the serial device, use this object with the functions listed in Object Functions.
Creation
Syntax
Description
creates a connection, myserialdevice
= serialdev(mypi
,port
)myserialdevice
, from the MATLAB software to the serial device on the Raspberry Pi hardware.
On the Raspberry Pi hardware, the /boot/cmdline.txt
file configures
/dev/serial0
as the serial device and sets the default baud to
115200
. The serial device connects to the Rx
and
Tx
pins on the GPIO header.
By default, the serial console in the customized version of Raspbian Linux® on your Raspberry Pi hardware is disabled. To use serialdev
, disable the
serial console.