-
Notifications
You must be signed in to change notification settings - Fork 0
/
Sanity.ino
55 lines (47 loc) · 881 Bytes
/
Sanity.ino
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
49
50
51
52
53
54
55
void sanity() {
//========================================
//Sanity Declarations ====================
static boolean sd = false;
static boolean atm = false;
static boolean gps_attached = false;
static boolean lux_attached = false;
static boolean tempHu = false;
if (!sd) {
if (SD.begin(chipSelect)) {
sd = true;
}
}
if (!lux_attached) {
if (initLux()) {
lux_attached = true;
}
}
if (!atm) {
if (initATM()) {
atm = true;
}
}
//GPS
if (!gps_attached) {
gps_attached = true;
}
if (!tempHu) {
if (initTempHu()) {
tempHu = true;
}
}
//========================================
//Data Verification ======================
if (gps_attached) {
readGPS();
}
if (atm) {
readATM();
}
if(lux_attached) {
readLux();
}
if (tempHu) {
readTempHu();
}
}