comparison py/setup_gpio.sh @ 535:3a514fbb88eb

ds18b20 works
author Matt Johnston <matt@ucc.asn.au>
date Tue, 19 May 2015 15:07:57 +0000
parents dce9f7841696
children 4632018d1c80
comparison
equal deleted inserted replaced
534:0cc7f2dda0e8 535:3a514fbb88eb
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # this must run as root 3 # this must run as root
4 4
5 PINS="17 7 24 25" 5 PINS="17"
6 GROUP=fridgeio
7 6
8 for PIN in $PINS; do 7 for PIN in $PINS; do
9 echo $PIN > /sys/class/gpio/export 8 echo $PIN > /sys/class/gpio/export
10
11 for f in direction value; do
12 fn=/sys/devices/virtual/gpio/gpio$PIN/$f
13 chgrp $GROUP $fn
14 chmod g+rw $fn
15 done
16 done 9 done