-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathz_loop.ino
More file actions
63 lines (53 loc) · 1.14 KB
/
Copy pathz_loop.ino
File metadata and controls
63 lines (53 loc) · 1.14 KB
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
56
57
58
59
60
// MAIN CODE
void loop() {
if (metro500.check() == 1) {
readTempsAndUpdate();
Serial3 << "~";
}
if (metro100.check() == 1) {
analogWrite(AlarmPin, sirenState);
analogWrite(ElementPowerPin, elementPowerLevelPercent * 2.55);
if (filling == true) {
fill();
}
if (currentCommand != "") {
commandDelay = commandDelay - 100;
if (commandDelay == 0) {
Serial << databaseID << ",complete" << endl;
clearCommand();
}
}
}
if (stringComplete == true) {
inputHandler();
}
if (scaleStringComplete == true) {
readScale();
}
//need to add command decomposition and subrouting switching section
if (metro1000.check() == 1) {
updateDisplay();
serialStatusMessage();
if (heatTimeSec > 0) {
heatTimeSec -= 1;
if (heatTimeSec = 0) {
if (setpoint == 212) {
endBoil();
}
else {
endHoldAt();
}
}
}
if (wortPumpDutyCycle > wpi) {
digitalWrite(wortPumpPin, 1);
}
else {
digitalWrite(wortPumpPin, 0);
}
wpi++;
if (wpi == wortPumpPeriod) {
wpi = 0;
}
}
}