Main Content

GPIO Write

Write logical value of GPIO pin configured as output

Add-On Required: This feature requires the Embedded Coder Support Package for BeagleBone Black Hardware add-on.

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.

Caution

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.

  • GPIO Write block

Parameters

Pin

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 View pin map.

Version History

Introduced in R2014b