comparison 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
comparison
equal deleted inserted replaced
446:d8ff29036740 447:8fdf86ea41e7
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