]>
Commit | Line | Data |
---|---|---|
3e34d2ce MG |
1 | #!/bin/bash |
2 | ||
3 | if [ "`id -u`" != "0" ]; then | |
4 | exec sudo "${0}" | |
5 | fi | |
6 | ||
7 | if [ ! -d "/sys/class/gpio/gpio18" ]; then | |
8 | echo 18 >/sys/class/gpio/export | |
9 | fi | |
10 | ||
11 | echo out >/sys/class/gpio/gpio18/direction | |
12 | echo 0 >/sys/class/gpio/gpio18/value | |
13 | sleep 0.2 | |
14 | echo 1 >/sys/class/gpio/gpio18/value | |
15 | sleep 2 |