readDigitalPin
Read logical value from GPIO input pin
Description
returns the logical value of a digital pin. pinvalue = readDigitalPin(mypi,pinNumber)
This method configures an unconfigured pin as a GPIO input.
If the pin is a GPIO output, or if another interface (I2C, Serial, SPI) uses the pin, this method returns an error message.
Note
To generate C/C++ code for this function, you must have an Embedded Coder® license.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2015b
