Skip to content

Commit 0ef30ed

Browse files
committed
Fahrenheit
1 parent d87707d commit 0ef30ed

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

examples/LGACSendDemo/LGACSendDemo.ino

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const int AC_TYPE = 0;
1212
// 1 : WALL
1313
//
1414

15-
const int AC_HEAT = 0;
15+
int AC_HEAT = 0;
1616
// 0 : cooling
1717
// 1 : heating
1818

@@ -63,8 +63,10 @@ void ac_activate(int temperature, int air_flow)
6363
int AC_MSBITS3 = 0;
6464
int AC_MSBITS4 ;
6565
if ( AC_HEAT == 1 ) {
66+
// heating
6667
AC_MSBITS4 = 4;
6768
} else {
69+
// cooling
6870
AC_MSBITS4 = 0;
6971
}
7072
int AC_MSBITS5 = temperature - 15;
@@ -165,7 +167,7 @@ void loop()
165167
if ( r != o_r) {
166168

167169
/*
168-
# a : mode or temp b : air_flow, temp, swing, clean
170+
# a : mode or temp b : air_flow, temp, swing, clean, cooling/heating
169171
# 18 ~ 30 : temp 0 ~ 2 : flow // on
170172
# 0 : off 0
171173
# 1 : on 0

examples/LGACSendDemo/LGACSendDemo.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,39 +32,44 @@
3232
| on / 27 / high | C |1000|1000|0000|0000|1100|0100|0000
3333
| on / 28 / high | C |1000|1000|0000|0000|1101|0100|0001
3434
|----------------|---|----|----|----|----|----|----|----
35-
| 1 up | C |1000|1000|0000|1000|1101|0100|1001
35+
| 1 up | C |1000|1000|0000|1000|1101|0100|1001
36+
|----------------|---|----|----|----|----|----|----|----
3637
| Cool power | C |1000|1000|0001|0000|0000|1100|1101
3738
| energy saving | C |1000|1000|0001|0000|0000|0100|0101
3839
| power | C |1000|1000|0001|0000|0000|1000|1001
3940
| flow/up/down | C |1000|1000|0001|0011|0001|0100|1001
4041
| up/down off | C |1000|1000|0001|0011|0001|0101|1010
4142
| flow/left/right| C |1000|1000|0001|0011|0001|0110|1011
42-
| left/right off | C |1000|1000|0001|0011|0001|0111|1100
43-
| Air clean | C |1000|1000|1100|0000|0000|0000|1100
43+
| left/right off | C |1000|1000|0001|0011|0001|0111|1100
44+
|----------------|---|----|----|----|----|----|----|----
45+
| Air clean | C |1000|1000|1100|0000|0000|0000|1100
46+
|----------------|---|----|----|----|----|----|----|----
4447
| off | C |1000|1000|1100|0000|0000|0101|0001
4548

4649

4750

4851
* remote / with heating
49-
* converted from raw code at https://github.com/chaeplin/RaspAC/blob/master/lircd.conf
52+
* converted using raw code at https://github.com/chaeplin/RaspAC/blob/master/lircd.conf
5053

5154
| status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7)
5255
|----------------|---|----|----|----|----|----|----|----
5356
| on | C |1000|1000|0000|0000|1011|0010|1101
54-
| of | C |1000|1000|1100|0000|0000|0101|0001
5557
|----------------|---|----|----|----|----|----|----|----
56-
| 64 | C |1000|1000|0000|0000|0011|0100|0111
57-
| 66 | C |1000|1000|0000|0000|0100|0100|1000
58-
| 68 | C |1000|1000|0000|0000|0101|0100|1001
59-
| 70 | C |1000|1000|0000|0000|0110|0100|1010
60-
| 72 | C |1000|1000|0000|0000|0111|0100|1011
61-
| 74 | C |1000|1000|0000|0000|1000|0100|1100
62-
| 76 | C |1000|1000|0000|0000|1010|0100|1110
63-
| 78 | C |1000|1000|0000|0000|1011|0100|1111
64-
| 80 | C |1000|1000|0000|0000|1100|0100|0000
65-
| 82 | C |1000|1000|0000|0000|1101|0100|0001
66-
| 84 | C |1000|1000|0000|0000|1110|0100|0010
67-
| 86 | C |1000|1000|0000|0000|1111|0100|0011
58+
| off | C |1000|1000|1100|0000|0000|0101|0001
59+
|----------------|---|----|----|----|----|----|----|----
60+
| 64 / 18 | C |1000|1000|0000|0000|0011|0100|0111
61+
| 66 / 19 | C |1000|1000|0000|0000|0100|0100|1000
62+
| 68 / 20 | C |1000|1000|0000|0000|0101|0100|1001
63+
| 70 / 21 | C |1000|1000|0000|0000|0110|0100|1010
64+
| 72 / 22 | C |1000|1000|0000|0000|0111|0100|1011
65+
| 74 / 23 | C |1000|1000|0000|0000|1000|0100|1100
66+
| 76 / 25 | C |1000|1000|0000|0000|1010|0100|1110
67+
| 78 / 26 | C |1000|1000|0000|0000|1011|0100|1111
68+
| 80 / 27 | C |1000|1000|0000|0000|1100|0100|0000
69+
| 82 / 28 | C |1000|1000|0000|0000|1101|0100|0001
70+
| 84 / 29 | C |1000|1000|0000|0000|1110|0100|0010
71+
| 86 / 20 | C |1000|1000|0000|0000|1111|0100|0011
72+
|----------------|---|----|----|----|----|----|----|----
6873
| heat64 | H |1000|1000|0000|0100|0011|0100|1011
6974
| heat66 | H |1000|1000|0000|0100|0100|0100|1100
7075
| heat68 | H |1000|1000|0000|0100|0101|0100|1101

0 commit comments

Comments
 (0)