File tree Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Expand file tree Collapse file tree 1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,11 @@ IRrecv irrecv (RECV_PIN);
1010const 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
1419int 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
3138const int AC_FLOW_TOWER[3 ] = {0 , 4 , 6 };
3239const 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
143155void 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 /*
You can’t perform that action at this time.
0 commit comments