Changes between Version 28 and Version 29 of gpio
- Timestamp:
- 12/15/2021 10:37:04 PM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
gpio
v28 v29 314 314 - **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 315 315 316 On Ubuntu {{{libgpiod}}} and its apps can be i sntalled via the {{{gpiod}}} package:316 On Ubuntu {{{libgpiod}}} and its apps can be installed via the {{{gpiod}}} package: 317 317 {{{#!bash 318 318 apt install gpiod 319 319 }}} 320 321 Note 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. 320 322 321 323 Examples: … … 326 328 # gpioget gpiochip3 7 327 329 1 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. 332 333 - Newport 333 334 {{{#!bash