comparison py/setup_gpio.sh @ 281:6e3b5bfa4b02

fix gpio chown script
author Matt Johnston <matt@ucc.asn.au>
date Mon, 30 Nov 2015 21:40:45 +0800
parents 4632018d1c80
children
comparison
equal deleted inserted replaced
279:6848907f85be 281:6e3b5bfa4b02
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # this must run as root 3 # this must run as root
4 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
7 5
8 PINS="17" 6 PINS="17"
9 7
10 for PIN in $PINS; do 8 for PIN in $PINS; do
11 echo $PIN > /sys/class/gpio/export 9 echo $PIN > /sys/class/gpio/export
12 done 10 done
11
12 chgrp gpio /sys/class/gpio/gpio17/direction /sys/class/gpio/gpio17/value
13 chmod g+w /sys/class/gpio/gpio17/direction /sys/class/gpio/gpio17/value