read
R2026bRead data from serial device
Description
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
returns number of bytes of data read from serial device.out = read(serialdevObj,numBytes)
also specifies the data precision.out = read(serialdevObj,numBytes,precision)
Examples
Input Arguments
Output Arguments
More About
Alternative Functionality
App
Use Arduino Explorer
to configure serial device and then read data from it. You can use the app in the installed
version of MATLAB and MATLAB
Online™. You can also use the Plot pane of the app to interactively
view data read from the Arduino board. For more information, see Connect to Serial Device Using Arduino Explorer App.
Version History
Introduced in R2019b