annotate py/setup_gpio.sh @ 278:fd9c6517225e

merge
author Matt Johnston <matt@ucc.asn.au>
date Tue, 17 Nov 2015 22:26:54 +0800
parents 4632018d1c80
children 6e3b5bfa4b02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
148
b32e5a11a4cb few updates, seems to run
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
1 #!/bin/sh
b32e5a11a4cb few updates, seems to run
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
2
b32e5a11a4cb few updates, seems to run
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
3 # this must run as root
b32e5a11a4cb few updates, seems to run
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
4
268
4632018d1c80 chown gpio files too
Matt Johnston <matt@ucc.asn.au>
parents: 239
diff changeset
5 chgrp gpio /sys/class/gpio/gpio17/direction /sys/class/gpio/gpio17/value
4632018d1c80 chown gpio files too
Matt Johnston <matt@ucc.asn.au>
parents: 239
diff changeset
6 chmod g+w /sys/class/gpio/gpio17/direction /sys/class/gpio/gpio17/value
4632018d1c80 chown gpio files too
Matt Johnston <matt@ucc.asn.au>
parents: 239
diff changeset
7
239
659953f2ee03 ds18b20 works
Matt Johnston <matt@ucc.asn.au>
parents: 155
diff changeset
8 PINS="17"
148
b32e5a11a4cb few updates, seems to run
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
9
155
d03157c7ad60 rough touch sensor
Matt Johnston <matt@ucc.asn.au>
parents: 148
diff changeset
10 for PIN in $PINS; do
d03157c7ad60 rough touch sensor
Matt Johnston <matt@ucc.asn.au>
parents: 148
diff changeset
11 echo $PIN > /sys/class/gpio/export
148
b32e5a11a4cb few updates, seems to run
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 done