-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHighCurrentTest.sh
executable file
·48 lines (48 loc) · 1.58 KB
/
HighCurrentTest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# This script tests the high current outputs
# See www.rau-deaver.org/Project_PiFly.html
#
# Written: 6/23/2017
# Rev.: 1.00
# By: Robert S. Rau
#
# Written: 6/24/2017
# Rev.: 1.01
# By: Robert S. Rau
# Changes: changed sleep values added first sleep. updated last echo. Set all fires low on exit
#
#
# setup outputs
gpio -g mode 17 out # Fire A output
gpio -g mode 22 out # Fire B output
gpio -g mode 23 out # Fire C output
gpio -g mode 24 out # Fire D output
gpio -g write 17 0 # Fire A set to zero
gpio -g write 22 0 # Fire B set to zero
gpio -g write 23 0 # Fire C set to zero
gpio -g write 24 0 # Fire D set to zero
gpio -g mode 25 out # Arm clock set to output
gpio -g write 25 0 # Arm clock set to zero
sleep 1
gpio -g write 25 1 # Arm clock set to one, now armed, red LED should be on
echo "Red armed LED should be on"
sleep 1
gpio -g write 17 1 # Fire A set to one
echo "Output A should be at Battery + voltage"
sleep 2
gpio -g write 22 1 # Fire B set to one
echo "Output B should be at Battery + voltage"
sleep 2
gpio -g write 23 1 # Fire C set to one
echo "Output C should be at Battery + voltage"
sleep 2
gpio -g write 24 1 # Fire D set to one
echo "Output D should be at Battery + voltage"
sleep 2
gpio -g write 25 0 # Arm clock set to zero
gpio -g write 25 1 # Arm clock set to one, now armed, red LED should be off
echo "Red armed LED should be off, all outputs should be off"
gpio -g write 17 0 # Fire A set to zero
gpio -g write 22 0 # Fire B set to zero
gpio -g write 23 0 # Fire C set to zero
gpio -g write 24 0 # Fire D set to zero