chiark / gitweb /
Debian build: Fix .so symlinks
[wiringPi.git] / gpio / test.sh
1 #!/bin/bash
2 #
3 # test.sh:
4 #       Simple test: Assumes LEDs on Pins 0-7 and lights them
5 #       in-turn.
6 #################################################################################
7 # This file is part of wiringPi:
8 #       Wiring Compatable library for the Raspberry Pi
9 #
10 #    wiringPi is free software: you can redistribute it and/or modify
11 #    it under the terms of the GNU Lesser General Public License as published by
12 #    the Free Software Foundation, either version 3 of the License, or
13 #    (at your option) any later version.
14 #
15 #    wiringPi is distributed in the hope that it will be useful,
16 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
17 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 #    GNU Lesser General Public License for more details.
19 #
20 #    You should have received a copy of the GNU Lesser General Public License
21 #    along with wiringPi.  If not, see <http://www.gnu.org/licenses/>.
22 #################################################################################
23
24 # Simple test - assumes LEDs on Pins 0-7.
25
26 for i in `seq 0 7`;
27 do
28   gpio mode $i out
29 done
30
31 while true;
32 do
33   for i in `seq 0 7`;
34   do
35     gpio write $i 1
36     sleep 0.1
37   done
38
39   for i in `seq 0 7`;
40   do
41     gpio write $i 0
42     sleep 0.1
43   done
44 done