Mercurial > templog
annotate py/setup_gpio.sh @ 268:4632018d1c80
chown gpio files too
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 10 Nov 2015 21:10:57 +0800 |
parents | 659953f2ee03 |
children | 6e3b5bfa4b02 |
rev | line source |
---|---|
148 | 1 #!/bin/sh |
2 | |
3 # this must run as root | |
4 | |
268 | 5 chgrp gpio /sys/class/gpio/gpio17/direction /sys/class/gpio/gpio17/value |
6 chmod g+w /sys/class/gpio/gpio17/direction /sys/class/gpio/gpio17/value | |
7 | |
239 | 8 PINS="17" |
148 | 9 |
155 | 10 for PIN in $PINS; do |
11 echo $PIN > /sys/class/gpio/export | |
148 | 12 done |