summaryrefslogtreecommitdiff
path: root/ring
diff options
context:
space:
mode:
authorDiego Roversi <diego.roversi@gmail.com>1970-01-01 01:20:14 +0100
committerDiego Roversi <diego.roversi@gmail.com>1970-01-01 01:20:14 +0100
commitf2f780daf24fb025232fc8bff592b414498ef042 (patch)
treece564ae75291aa586df9ea5af7264b646b606842 /ring
parent7df0c04faba3195f3daf83619ced0b52ee7b05f9 (diff)
added ring.sh script, to ring the bellsHEADmaster
Diffstat (limited to 'ring')
-rwxr-xr-xring/ring.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/ring/ring.sh b/ring/ring.sh
new file mode 100755
index 0000000..ab3d192
--- /dev/null
+++ b/ring/ring.sh
@@ -0,0 +1,17 @@
+# PB4 -> gpio2 - pin 13
+# PB10 -> gpio2 - pin 15
+echo 2 > /sys/class/gpio/export
+echo 3 > /sys/class/gpio/export
+echo out > /sys/class/gpio/gpio2_pb4/direction
+echo out > /sys/class/gpio/gpio3_pb10/direction
+
+for i in $(seq 1 10); do
+ echo 1 > /sys/class/gpio/gpio2_pb4/value
+ sleep 0.001
+ echo 1 > /sys/class/gpio/gpio3_pb10/value
+ sleep 0.001
+ echo 0 > /sys/class/gpio/gpio2_pb4/value
+ sleep 0.001
+ echo 0 > /sys/class/gpio/gpio3_pb10/value
+ sleep 0.001
+done