gpiomon can monitor more than one GPIO pin. You'll need to read the output of the command to see which GPIO was triggered.What about if there are more than only one sensors?
Something like
Code:
#!/bin/bashGPIO_CHIP="gpiochip0"SWITCHPINS="17 18 19"EVENT="$(gpiomon --num-events=1 --format="%o %e" $GPIO_CHIP $SWITCHPINS)"echo "Event detected: $EVENT"You can add a loop round that to keep polling.
Statistics: Posted by rpdom — Tue Feb 25, 2025 11:26 am