diff py/setup_gpio.sh @ 447:8fdf86ea41e7

few updates, seems to run
author Matt Johnston <matt@ucc.asn.au>
date Sat, 15 Dec 2012 23:49:08 +0800
parents
children d03157c7ad60
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/py/setup_gpio.sh	Sat Dec 15 23:49:08 2012 +0800
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# this must run as root
+
+PIN=17
+GROUP=fridgeio
+
+echo $PIN > /sys/class/gpio/export
+
+for f in direction value; do
+    fn=/sys/devices/virtual/gpio/gpio$PIN/$f
+    chgrp $GROUP $fn
+    chmod g+rw $fn
+done