Mercurial > templog
comparison py/setup_gpio.sh @ 294:6bacd8ca9f8f
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 06 Jul 2019 18:30:25 +0800 |
parents | 6e3b5bfa4b02 |
children |
comparison
equal
deleted
inserted
replaced
293:d15dda1b1f76 | 294:6bacd8ca9f8f |
---|---|
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 |