comparison py/setup_gpio.sh @ 567:f93290b37abf

chown gpio files too
author Matt Johnston <matt@ucc.asn.au>
date Tue, 10 Nov 2015 21:10:57 +0800
parents 3a514fbb88eb
children 6e3b5bfa4b02
comparison
equal deleted inserted replaced
566:87d064493714 567:f93290b37abf
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # this must run as root 3 # this must run as root
4
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
4 7
5 PINS="17" 8 PINS="17"
6 9
7 for PIN in $PINS; do 10 for PIN in $PINS; do
8 echo $PIN > /sys/class/gpio/export 11 echo $PIN > /sys/class/gpio/export