Skip to content

Commit d87707d

Browse files
committed
add heating
1 parent d8bdbb1 commit d87707d

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

examples/LGACSendDemo/LGACSendDemo.ino

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ IRrecv irrecv (RECV_PIN);
1010
const int AC_TYPE = 0;
1111
// 0 : TOWER
1212
// 1 : WALL
13+
//
14+
15+
const int AC_HEAT = 0;
16+
// 0 : cooling
17+
// 1 : heating
1318

1419
int AC_POWER_ON = 0;
1520
// 0 : off
@@ -27,6 +32,8 @@ int AC_FLOW = 1;
2732
// 1 : mid
2833
// 2 : high
2934
// if AC_TYPE =1, 3 : change
35+
//
36+
3037

3138
const int AC_FLOW_TOWER[3] = {0, 4, 6};
3239
const int AC_FLOW_WALL[4] = {0, 2, 4, 5};
@@ -54,7 +61,12 @@ void ac_activate(int temperature, int air_flow)
5461
int AC_MSBITS1 = 8;
5562
int AC_MSBITS2 = 8;
5663
int AC_MSBITS3 = 0;
57-
int AC_MSBITS4 = 0;
64+
int AC_MSBITS4 ;
65+
if ( AC_HEAT == 1 ) {
66+
AC_MSBITS4 = 4;
67+
} else {
68+
AC_MSBITS4 = 0;
69+
}
5870
int AC_MSBITS5 = temperature - 15;
5971
int AC_MSBITS6 ;
6072

@@ -131,13 +143,13 @@ void setup()
131143

132144
Serial.println(" - - - T E S T - - - ");
133145

134-
/* test
135-
ac_activate(25, 1);
136-
delay(5000);
137-
ac_activate(27, 2);
138-
delay(5000);
146+
/* test
147+
ac_activate(25, 1);
148+
delay(5000);
149+
ac_activate(27, 2);
150+
delay(5000);
139151
140-
*/
152+
*/
141153
}
142154

143155
void loop()
@@ -149,7 +161,7 @@ void loop()
149161
ac_activate(27, 0);
150162
delay(5000);
151163

152-
164+
153165
if ( r != o_r) {
154166

155167
/*

0 commit comments

Comments
 (0)