comparison py/setup_gpio.sh @ 148:b32e5a11a4cb

few updates, seems to run
author Matt Johnston <matt@ucc.asn.au>
date Sat, 15 Dec 2012 23:49:08 +0800
parents
children d03157c7ad60
comparison
equal deleted inserted replaced
147:ab1e7bf77d69 148:b32e5a11a4cb
1 #!/bin/sh
2
3 # this must run as root
4
5 PIN=17
6 GROUP=fridgeio
7
8 echo $PIN > /sys/class/gpio/export
9
10 for f in direction value; do
11 fn=/sys/devices/virtual/gpio/gpio$PIN/$f
12 chgrp $GROUP $fn
13 chmod g+rw $fn
14 done