#!/bin/bash gpio mode 0 in gpio mode 1 in gpio mode 2 in while true; do bin0=$(gpio read 0) ## PIN 11 bin1=$(gpio read 1) ## PIN 12 bin2=$(gpio read 2) ## PIN 13 binaer="$bin2$bin1$bin0" # neue zusammengesetzte Variable if [ $binaer = "000" ]; then echo "Input = 000 also 0" echo "servo 100" echo 22=100 > /dev/servoblaster elif [ $binaer = "001" ]; then echo "Input = 001 also 1" elif [ $binaer = "010" ]; then echo "Input = 010 also 2" elif [ $binaer = "011" ]; then echo "Input = 011 also 3" elif [ $binaer = "100" ]; then echo "Input = 100 also 4" elif [ $binaer = "101" ]; then echo "Input = 101 also 5" elif [ $binaer = "110" ]; then echo "Input = 110 also 6" echo "servo 150" echo 22=150 > /dev/servoblaster elif [ $binaer = "111" ]; then echo "Input = 111" # echo "Lampe an" # gpio mode 6 out # gpio write 6 1 # sleep 2s # gpio write 6 0 else echo "Null" fi sleep 0.9s done