Digital Read
R2026bRead logical state of digital input pin
Libraries:
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
Common
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
STM32F746G-Discovery
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
STM32F769I-Discovery
STM32 Microcontroller Blockset /
(Legacy) STM32 MBED Based Boards /
STM32L475VG-Discovery (B-L475E-IOT01A)
Description
The Digital Read block outputs the logical state of a specified digital pin on the 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.
"stm32nucleodiscoboardslib/Common/Digital Read"
"stm32f7lib/Digital Read"
"stm32f769ilib/Digital Read"
"stm32l475vglib/Digital Read"
Example: add_block("stm32nucleodiscoboardslib/Common/Digital Read","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2018a