Changes between Version 28 and Version 29 of gpio


Ignore:
Timestamp:
12/15/2021 10:37:04 PM (3 years ago)
Author:
Tim Harvey
Comment:

clarify the behavior of gpioset

Legend:

Unmodified
Added
Removed
Modified
  • gpio

    v28 v29  
    314314 - **gpiomon** - wait for events on GPIO lines, specify which events to watch, how many events to process before exiting or if the events should be reported to the console
    315315
    316 On Ubuntu {{{libgpiod}}} and its apps can be isntalled via the {{{gpiod}}} package:
     316On Ubuntu {{{libgpiod}}} and its apps can be installed via the {{{gpiod}}} package:
    317317{{{#!bash
    318318apt install gpiod
    319319}}}
     320
     321Note that {{{gpioset}}} (and all libgpiod apps) will revert the state of a GPIO line back to its original value when it exits. For this reason if you want the state to persist you need to instruct {{{gpioset}}} to wait for a signal and optionally detach and run in the background.
    320322
    321323Examples:
     
    326328# gpioget gpiochip3 7
    3273291
    328 # gpioset gpiochip 3 7=0
    329 # gpioget gpiochip3 7
    330 0
    331 }}}
     330# gpioset --mode=signal --background gpiochip 3 7=0
     331}}}
     332  - Note that once gpioset exits its process the GPIO's it changed will revert back to their prior state (by design) therefor we run it above with {{{--mode=signal}}} telling it to continue to run into it receives a signal and (optinally) {{{--background}}} telling it to detach from the controlling terminal to give our shell back.
    332333 - Newport
    333334{{{#!bash