There is an option -p which is stated to be:
the minimum time period to hold lines at the requested values
When I execute with -p, the command hangs:
gpioset -p 0 My-led=1
The gpio line is set correctly, but the program does not terminate. If I set the time to 1, the command also does not exit.
Some man pages show this option:
-m, --mode=[exit|wait|time|signal] (defaults to 'exit')
However this option no longer exists.
The only think I could come up with:
gpioset -z My-led=1;pkill gpioset
-z, --daemonize set values then detach from the controlling terminal
Sure, try
to get the immediate exit behavior of v1.
The
-p
option is useful in combination with the-t
to ensure the line is held for at least that long before toggling/exiting, and with the--interactive
mode to ensure commands cannot toggle lines faster than a given rate.The
-t
option can also be used to drive a sequence out a line, then exit if 0 terminated else repeat. e.g.-t3,1
will blink a line with a 75% duty cycle indefinitely, while-t3,1,0
will exit after one cycle.