Digital Input
R2026bGet logical state of digital input pin on Arduino
Libraries:
Simulink Support Package for Arduino Hardware /
Common
Description
Add-On Required: This feature requires the Simulink Support Package for Arduino Hardware add-on.
Use the Digital Input block to read and output the logical state of the digital pins on your Arduino® board.
During the external mode simulation, the block outputs the simulation results returned from the executable running on the target hardware. During simulation in all other modes, the block outputs zeroes.
Ports
Output
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"arduinolib/Digital Input"
Example: add_block("arduinolib/Digital Input","myModel/myBlock",MakeNameUnique="on")
Version History
Introduced in R2012a