serialdev
Connection to serial device on Raspberry Pi hardware
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.
Note
To generate C/C++ code for this object and its associated functions, you must have an Embedded Coder® license.
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.
Input Arguments
Properties
Examples
Extended Capabilities
Version History
Introduced in R2016b
