GPIO Write

Description

The GPIO Write component is used to control the state of GPIO pins.

Sets the specified pin to output mode and can set it to 0, 1, or toggle the current state. It is used when controlling devices such as relays.

Limitation: This component only works on linux/arm64 environments.
If executed on unsupported platforms, an error message "component not supported on XX" will be displayed.

When using Raspberry Pi, please use RPI4+Ubuntu 24.04.2 LTS. RPI5 is not supported.

Warning: Do not use GPIO Write on pins with connected input devices such as switches. The pin will switch to output mode, which may cause overcurrent. When using switches or relays, please follow the connection methods according to device specifications.

gpiowrite
Output PayloadDescription
cv.PayloadThe input payload is output

Component Properties

Property NameDescription
Pin Name1Specifies the name of the GPIO pin to control
Operation2Specifies the operation to execute on the GPIO pin

1 Pin name format varies by device.

• Raspberry Pi: GPIO number (e.g., GPIO16, GPIO6, etc.)
• Jetson Orin Nano: SoC GPIO port name (e.g., PQ.06, PH.00, etc.)

For detailed pin layouts, please refer to the following documents:

Raspberry Pi
Jetson Orin Nano

2 You can select the operation to execute on the GPIO pin from the following options:

• Set to 0 (Low (0)): Sets the pin to Low.
• Set to 1 (High (1)): Sets the pin to High.
• Toggle (Toggle (2)): Inverts the current pin state. If High, switches to Low; if Low, switches to High.

This property can be set by passing integer values (0, 1, 2) using Pre Mappings.