GPIO Write

Write logical value of GPIO pin configured as output

Description

Configure a GPIO pin on the target hardware to function as a physical output.

Send a logical value from your model to the GPIO pin. The sample time is determined by an upstream block.

The block input accepts boolean inputs.

Do not exceed the maximum voltage of the GPIO pin.

Warning

You can damage your target hardware by:

  • Shorting a GPIO pin to ground.

  • Shorting a GPIO pin with high voltage to another GPIO pin with low voltage.

  • Connecting a GPIO pin to a voltage source greater than the maximum voltage.

  • Exceeding the maximum current by driving multiple GPIO pins high simultaneously.

Parameters

Raspberry Pi™

Board

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.

GPIO number

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.

See Also

External Websites