mirror of
https://github.com/Theaninova/Arduino-IRremote.git
synced 2026-01-04 20:42:49 +00:00
add heating
This commit is contained in:
@@ -10,6 +10,11 @@ IRrecv irrecv (RECV_PIN);
|
|||||||
const int AC_TYPE = 0;
|
const int AC_TYPE = 0;
|
||||||
// 0 : TOWER
|
// 0 : TOWER
|
||||||
// 1 : WALL
|
// 1 : WALL
|
||||||
|
//
|
||||||
|
|
||||||
|
const int AC_HEAT = 0;
|
||||||
|
// 0 : cooling
|
||||||
|
// 1 : heating
|
||||||
|
|
||||||
int AC_POWER_ON = 0;
|
int AC_POWER_ON = 0;
|
||||||
// 0 : off
|
// 0 : off
|
||||||
@@ -27,6 +32,8 @@ int AC_FLOW = 1;
|
|||||||
// 1 : mid
|
// 1 : mid
|
||||||
// 2 : high
|
// 2 : high
|
||||||
// if AC_TYPE =1, 3 : change
|
// if AC_TYPE =1, 3 : change
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
const int AC_FLOW_TOWER[3] = {0, 4, 6};
|
const int AC_FLOW_TOWER[3] = {0, 4, 6};
|
||||||
const int AC_FLOW_WALL[4] = {0, 2, 4, 5};
|
const int AC_FLOW_WALL[4] = {0, 2, 4, 5};
|
||||||
@@ -54,7 +61,12 @@ void ac_activate(int temperature, int air_flow)
|
|||||||
int AC_MSBITS1 = 8;
|
int AC_MSBITS1 = 8;
|
||||||
int AC_MSBITS2 = 8;
|
int AC_MSBITS2 = 8;
|
||||||
int AC_MSBITS3 = 0;
|
int AC_MSBITS3 = 0;
|
||||||
int AC_MSBITS4 = 0;
|
int AC_MSBITS4 ;
|
||||||
|
if ( AC_HEAT == 1 ) {
|
||||||
|
AC_MSBITS4 = 4;
|
||||||
|
} else {
|
||||||
|
AC_MSBITS4 = 0;
|
||||||
|
}
|
||||||
int AC_MSBITS5 = temperature - 15;
|
int AC_MSBITS5 = temperature - 15;
|
||||||
int AC_MSBITS6 ;
|
int AC_MSBITS6 ;
|
||||||
|
|
||||||
@@ -131,13 +143,13 @@ void setup()
|
|||||||
|
|
||||||
Serial.println(" - - - T E S T - - - ");
|
Serial.println(" - - - T E S T - - - ");
|
||||||
|
|
||||||
/* test
|
/* test
|
||||||
ac_activate(25, 1);
|
ac_activate(25, 1);
|
||||||
delay(5000);
|
delay(5000);
|
||||||
ac_activate(27, 2);
|
ac_activate(27, 2);
|
||||||
delay(5000);
|
delay(5000);
|
||||||
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
@@ -149,7 +161,7 @@ void loop()
|
|||||||
ac_activate(27, 0);
|
ac_activate(27, 0);
|
||||||
delay(5000);
|
delay(5000);
|
||||||
|
|
||||||
|
|
||||||
if ( r != o_r) {
|
if ( r != o_r) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user