diff --git a/dooropen b/dooropen index 04ddfdc..2776946 100755 --- a/dooropen +++ b/dooropen @@ -1,12 +1,7 @@ #!/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..." diff --git a/setup b/setup index 3d2c579..2619de7 100755 --- a/setup +++ b/setup @@ -8,9 +8,15 @@ chown -R root:gpio /sys/class/gpio/gpio27/* chmod g+w /sys/class/gpio/gpio27/* echo "Setting up gpio: lock" -echo "27" > /sys/class/gpio/unexport echo "22" > /sys/class/gpio/unexport echo "22" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio22/direction chown -R root:gpio /sys/class/gpio/gpio22/* chmod g+w /sys/class/gpio/gpio22/* + +echo "Setting up gpio: dooropen" +echo "17" > /sys/class/gpio/unexport +echo "17" > /sys/class/gpio/export +echo "out" > /sys/class/gpio/gpio17/direction +chown -R root:gpio /sys/class/gpio/gpio17/* +chmod g+w /sys/class/gpio/gpio17/*