annotate py/setup_gpio.sh @ 271:11cebd6f0bfb
untested fridge.integrator
author |
Matt Johnston <matt@ucc.asn.au> |
date |
Wed, 11 Nov 2015 00:20:20 +0800 |
parents |
4632018d1c80 |
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 |