Skip to main content
Set the digital output level of GPIO pins, with an optional hold mode that keeps the output asserted until interrupted.

Syntax

Arguments

Level Values

The following values are accepted (case-insensitive):

Options


Usage

Hold Mode

The --hold flag keeps the process alive after setting the output level. The pin state is maintained until you press Ctrl+C. This is useful when you need to assert a signal for manual testing or when the pin state would otherwise be reset between CLI invocations.

Supported Hardware

Aardvark and FT232H GPIO support is currently disabled and may be re-enabled in a future release. LabJack T7 and MCC USB-202 are the active GPIO backends.

Aardvark Pin Mapping

The Aardvark I2C/SPI adapter exposes 6 GPIO pins on its 10-pin header. Pins can be specified by number or signal name:

FT232H Pin Mapping

The FT232H provides 16 GPIO pins across two ports:

Examples



Notes

  • GPO is for setting output pins only
  • Use lager gpi to read input pins
  • Default net can be set with lager defaults add --gpio-net
  • Pin must be configured as output in net configuration
  • Toggle reads current state and inverts it
  • USB-202 channels can be specified as 0-7 or DIO0-DIO7
  • --hold keeps the process running; press Ctrl+C to release the pin and exit
  • Without --hold, the output level is set and the command exits immediately; the pin retains its state until the next command