concierge/dooropen
2014-12-10 02:46:06 +01:00

22 lines
522 B
Bash
Executable file

#!/bin/sh
echo "Initializing Door Systems..."
echo "17" > /sys/class/gpio/unexport
echo "17" > /sys/class/gpio/export
sleep 0.5
echo "Securing Communication to Door Systems..."
echo "out" > /sys/class/gpio/gpio17/direction
sleep 0.5
echo "Open Communication Channel..."
sleep 0.5
echo "Opening Door..."
echo "1" > /sys/class/gpio/gpio17/value
sleep 1
echo "Welcome"
echo "0" > /sys/class/gpio/gpio17/value
sleep 3
echo "Aaand again"
echo "1" > /sys/class/gpio/gpio17/value
sleep 1
echo "0" > /sys/class/gpio/gpio17/value