1 changed files with 13 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||||
|
#! /usr/bin/bash |
||||
|
#File: button.sh |
||||
|
|
||||
|
pin_button=23 # Button an BCM23 |
||||
|
gpiochip="gpiochip0" |
||||
|
|
||||
|
pinctrl set ${pin_button} pu # Pin |
||||
|
while true; do |
||||
|
gpioget ${gpiochip} ${pin_button} |
||||
|
sleep 3 |
||||
|
done |
||||
|
|
||||
|
|
Loading…
Reference in new issue