Mercurial > templog
comparison py/setup_gpio.sh @ 293:d15dda1b1f76
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 06 Jul 2019 18:29:45 +0800 |
parents | 659953f2ee03 |
children | 4632018d1c80 |
comparison
equal
deleted
inserted
replaced
292:28eb733cb803 | 293:d15dda1b1f76 |
---|---|
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 |