Browse Source

ein gpioset Kommando schaltet alle LED.

master
Olli Graf 2 weeks ago
parent
commit
1ab2d103ec
  1. 8
      raspi-bash/ampel.sh

8
raspi-bash/ampel.sh

@ -17,9 +17,7 @@ function resetPins() {
function setPins() {
gpioset "${gpiochip}" ${pin_rot}=${state_rot}
gpioset "${gpiochip}" ${pin_gelb}=${state_gelb}
gpioset "${gpiochip}" ${pin_gruen}=${state_gruen}
gpioset "${gpiochip}" ${pin_rot}=${state_rot} ${pin_gelb}=${state_gelb} ${pin_gruen}=${state_gruen}
}
function ampel() {
@ -59,8 +57,8 @@ function ampel() {
esac
}
for i in 1 2 3 4; do
ampel "${i}"
for phase in 1 2 3 4 1; do
ampel "${phase}"
done
resetPins

Loading…
Cancel
Save