Syntax
Arguments
Options
Usage
Basic Read
Wait for Level
Block until a pin reaches a target level. Useful for waiting on hardware events like button presses, interrupt lines, or device ready signals.Advanced Streaming Options
For LabJack T7 hardware, the--wait-for command uses high-speed streaming to detect level changes. You can tune the streaming parameters:
Output
Basic Read
Returns the digital state:0- Low (0V)1- High (3.3V or 5V depending on hardware)
Wait for Level
Returns the elapsed time in seconds when the target level is reached:Supported Hardware
Aardvark and FT232H GPIO support is currently disabled. A future release can enable it again. LabJack T7, LabJack U3 and MCC USB-202 are the active GPIO backends.
LabJack U3 Pins
FIO0-FIO3are not offered asgpiochannels. On a U3-HV they are fixed high-voltage analog inputs. Read them with anadcnet onAIN0-AIN3.- Lager treats every U3 as a U3-HV, so a U3-LV also loses these four digital lines.
- A U3 reads a pin without a change to its direction. A write sets the pin to output.
FIO4-FIO7andEIO0-EIO7are also analog inputs. Agpioread sets the pin to digital mode, and anadcread sets it back to analog mode.- A
gpionet saved onFIO0-FIO3before version 0.46.1 still lists, but fails when you use it. Delete that net.
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
Related Commands
lager gpo- Set GPIO output level
Notes
- GPI is for reading input pins only
- Use
lager gpoto set output pins - Default net can be set with
lager defaults add --gpio-net - Pin must be configured as input in net configuration
- USB-202 channels can be specified as
0-7orDIO0-DIO7 --wait-forblocks the process until the target level is detected or the timeout expires--scan-rateand--scans-per-readonly apply to LabJack T7 streaming; they are ignored by other drivers--poll-intervalapplies to non-streaming drivers (LabJack U3, USB-202, Aardvark, FT232H); ignored by LabJack T7

