Read logical value of GPIO pin configured as input
Simulink Support Package for BeagleBoard Hardware
Simulink Support Package for Gumstix Overo Hardware
Simulink Support Package for PandaBoard Hardware
Simulink Support Package for Raspberry Pi Hardware
Use this block to:
Create a physical input from a GPIO pin.
Read the logical value of the GPIO pin at intervals that are determined by Sample time.
Send the logical value to other blocks in the model as a stream of boolean values.
The maximum input voltage of the GPIO pin is 1.8 V.
Warning You can damage your target hardware by:
Select the specific board you are using. You can find this information on the target hardware, product packaging, or product documentation.
Changing Board updates the GPIO number choices and the View pin map diagram.
You can print the pin map to refer to it later.
After selecting the Board, select the number of the GPIO pin. Do not use the same GPIO number in multiple blocks within a model.
To see the locations of the GPIO pins on the target hardware, click the View pin map button.
This parameter is not available for Raspberry Pi™ hardware.
Set the GPIO internal resistor to:
Off — Do not use a pull-up or pull-down resistor.
Pull-up — Use the internal pull-up resistor. When the physical input is inactive, disconnected, or has high impedance, the voltage of the GPIO pin goes high, settling at the voltage of Vdd on the processor.
Pull-down — Use the internal pull-up resistor. When the physical input is inactive, disconnected, or has high impedance, the voltage of the GPIO pin goes low, settling at the voltage of ground on the processor.
Changing this parameter updates the diagram to the right of the parameter.
Select the sample time for reading the state of the GPIO pin. This parameter value defaults to 1/10 second.
Smaller values require the processor to complete the same number of instructions in less time, which can cause task overruns.
Install Support for BeagleBoard Hardware | Install Support for Gumstix Overo Hardware | Install Support for PandaBoard Hardware | Tune and Monitor Model Running on BeagleBoard Hardware | Tune and Monitor Model Running on Gumstix Overo Hardware | Tune and Monitor Model Running on PandaBoard Hardware