-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbutton_functions.ino
105 lines (85 loc) · 1.28 KB
/
button_functions.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/*
0000000000111111
0123456789012345
0OVERRIDE WARNING
1 ON
*/
void temp_disp()
{
lcd.clear();
lcd.setCursor(2,0);
lcd.print("TEMPERATURE");
lcd.setCursor(7,1);
lcd.print(temp_defined);
delay(1000);
ebag_disp();
}
void refrigerator_temperature_control()
{
if (ref_rel == true)
{
temp_current = (analogRead(temperature)-10);
if (temp_defined <= temp_current)
{
digitalWrite(refrigerator_relay,HIGH);
}
else
{
digitalWrite(refrigerator_relay,LOW);
}
}
}
void ref_temp_disp()
{
lcd.clear();
lcd.setCursor(2,0);
lcd.print("REFRIGERATOR");
lcd.setCursor(7,1);
switch(ref_rel)
{
case 0:
lcd.print("OFF");
break;
case 1:
lcd.print("ON");
break;
}
delay(1000);
ebag_disp();
}
void disp_temp_disp()
{
lcd.clear();
lcd.setCursor(5,0);
lcd.print("DISPLAY");
lcd.setCursor(7,1);
switch(disp)
{
case 0:
lcd.print("OFF");
break;
case 1:
lcd.print("ON");
break;
}
delay(1000);
ebag_disp();
}
void ovr_temp_disp()
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("OVERRIDE WARNING");
lcd.setCursor(7,1);
switch(override)
{
case 0:
lcd.print("OFF");
break;
case 1:
lcd.print("ON");
break;
}
delay(1000);
ebag_disp();
}