readVoltage
R2026bRead voltage from analog pin on Arduino hardware
Description
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
specifies additional options using one or more name-value arguments. You can use
this syntax only when you connect the Arduino hardware to your computer over USB. (since R2025a)voltage = readVoltage(___,Name=Value)
Examples
Input Arguments
Name-Value Arguments
Output Arguments
More About
Alternative Functionality
App
Use the Pin Explorer pane and Pin Configuration panel in the Arduino Explorer to read the voltage on the specified analog input pin of Arduino or any other supported hardware in MATLAB and MATLAB Online™. In the Pin Configuration panel, set the Mode as Analog Input (Read), and if required specify a Label to uniquely identify the pin. You can also use the plot pane of the app to interactively view data read from the board.