comparison 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
comparison
equal deleted inserted replaced
267:08c3cf3d0ded 268:4632018d1c80
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