Mercurial > templog
comparison py/setup_gpio.sh @ 239:659953f2ee03
ds18b20 works
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 19 May 2015 15:07:57 +0000 |
parents | d03157c7ad60 |
children | 4632018d1c80 |
comparison
equal
deleted
inserted
replaced
235:4cbcbba567ab | 239:659953f2ee03 |
---|---|
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 |