serialdevObj — Serial device connection device object
Serial device connection, specified as a device object.
numBytes — Number of bytes to read scalar
Number of bytes of data to read from the serial device, specified as a
scalar.
Note
For the Arduino® Mega2560, Mega ADK, Leonardo, and Micro boards read
works only for up to 63 bytes of data as the Arduino libraries do not read data into last byte of serial receive buffer.
See this link for more details.
Use read in a MATLAB® Function block with the Simulink® Support Package for Arduino Hardware to generate code that can be deployed on Arduino Hardware.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.