Mercurial > templog
comparison py/setup_gpio.sh @ 299:358c50004679
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Mon, 27 Feb 2017 23:20:07 +0800 |
parents | 6e3b5bfa4b02 |
children |
comparison
equal
deleted
inserted
replaced
286:61269311ed3d | 299:358c50004679 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 | 2 |
3 # this must run as root | 3 # this must run as root |
4 | |
4 | 5 |
5 PINS="17" | 6 PINS="17" |
6 | 7 |
7 for PIN in $PINS; do | 8 for PIN in $PINS; do |
8 echo $PIN > /sys/class/gpio/export | 9 echo $PIN > /sys/class/gpio/export |
9 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 |