From 594722ad4d4251292c28f6ea10656bfa9d594064 Mon Sep 17 00:00:00 2001 From: chaeplin Date: Thu, 27 Aug 2015 20:55:40 +0900 Subject: [PATCH 1/9] heating --- examples/LGACSendDemo/LGACSendDemo.md | 86 ++++++++++++++++++++------- 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/examples/LGACSendDemo/LGACSendDemo.md b/examples/LGACSendDemo/LGACSendDemo.md index 1bff51f..3fe73c6 100644 --- a/examples/LGACSendDemo/LGACSendDemo.md +++ b/examples/LGACSendDemo/LGACSendDemo.md @@ -3,33 +3,75 @@ === *** === +- (0) : Cooling or Heating - (1) : fixed - (2) : fixed - (3) : special(power, swing, air clean) -- (4) : change air flow, temperature +- (4) : change air flow, temperature, coolingi(0)/heating(4) - (5) : temperature ( 15 + (5) = ) - (6) : air flow - (7) : crc ( 3 + 4 + 5 + 6 ) & B00001111 -=== *** === -| status | (1)| (2)| (3)| (4)| (5)| (6)| (7) -|----------------|----|----|----|----|----|----|---- -| on / 25 / mid |1000|1000|0000|0000|1010|0010|1100 -| on / 26 / mid |1000|1000|0000|0000|1011|0010|1101 -| on / 27 / mid |1000|1000|0000|0000|1100|0010|1110 -| on / 28 / mid |1000|1000|0000|0000|1101|0010|1111 -| on / 25 / high |1000|1000|0000|0000|1010|0100|1110 -| on / 26 / high |1000|1000|0000|0000|1011|0100|1111 -| on / 27 / high |1000|1000|0000|0000|1100|0100|0000 -| on / 28 / high |1000|1000|0000|0000|1101|0100|0001 -| 1 up |1000|1000|0000|1000|1101|0100|1001 -| Cool power |1000|1000|0001|0000|0000|1100|1101 -| energy saving |1000|1000|0001|0000|0000|0100|0101 -| power |1000|1000|0001|0000|0000|1000|1001 -| flow/up/down |1000|1000|0001|0011|0001|0100|1001 -| up/down off |1000|1000|0001|0011|0001|0101|1010 -| flow/left/right|1000|1000|0001|0011|0001|0110|1011 -| left/right off |1000|1000|0001|0011|0001|0111|1100 -| Air clean |1000|1000|1100|0000|0000|0000|1100 -| off |1000|1000|1100|0000|0000|0101|0001 \ No newline at end of file +°F = °C × 1.8 + 32 +°C = (°F − 32) / 1.8 + + +=== *** === +* remote / Korea / without heating +| status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7) +|----------------|---|----|----|----|----|----|----|---- +| on / 25 / mid | C |1000|1000|0000|0000|1010|0010|1100 +| on / 26 / mid | C |1000|1000|0000|0000|1011|0010|1101 +| on / 27 / mid | C |1000|1000|0000|0000|1100|0010|1110 +| on / 28 / mid | C |1000|1000|0000|0000|1101|0010|1111 +| on / 25 / high | C |1000|1000|0000|0000|1010|0100|1110 +| on / 26 / high | C |1000|1000|0000|0000|1011|0100|1111 +| on / 27 / high | C |1000|1000|0000|0000|1100|0100|0000 +| on / 28 / high | C |1000|1000|0000|0000|1101|0100|0001 +| 1 up | C |1000|1000|0000|1000|1101|0100|1001 +| Cool power | C |1000|1000|0001|0000|0000|1100|1101 +| energy saving | C |1000|1000|0001|0000|0000|0100|0101 +| power | C |1000|1000|0001|0000|0000|1000|1001 +| flow/up/down | C |1000|1000|0001|0011|0001|0100|1001 +| up/down off | C |1000|1000|0001|0011|0001|0101|1010 +| flow/left/right| C |1000|1000|0001|0011|0001|0110|1011 +| left/right off | C |1000|1000|0001|0011|0001|0111|1100 +| Air clean | C |1000|1000|1100|0000|0000|0000|1100 +| off | C |1000|1000|1100|0000|0000|0101|0001 + + + +* remote / with heating +* converted from raw code at https://github.com/chaeplin/RaspAC/blob/master/lircd.conf + +| status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7) +|----------------|---|----|----|----|----|----|----|---- +| on | C |1000|1000|0000|0000|1011|0010|1101 +| of | C |1000|1000|1100|0000|0000|0101|0001 +|----------------|---|----|----|----|----|----|----|---- +| 64 | C |1000|1000|0000|0000|0011|0100|0111 +| 66 | C |1000|1000|0000|0000|0100|0100|1000 +| 68 | C |1000|1000|0000|0000|0101|0100|1001 +| 70 | C |1000|1000|0000|0000|0110|0100|1010 +| 72 | C |1000|1000|0000|0000|0111|0100|1011 +| 74 | C |1000|1000|0000|0000|1000|0100|1100 +| 76 | C |1000|1000|0000|0000|1010|0100|1110 +| 78 | C |1000|1000|0000|0000|1011|0100|1111 +| 80 | C |1000|1000|0000|0000|1100|0100|0000 +| 82 | C |1000|1000|0000|0000|1101|0100|0001 +| 84 | C |1000|1000|0000|0000|1110|0100|0010 +| 86 | C |1000|1000|0000|0000|1111|0100|0011 +| heat64 | H |1000|1000|0000|0100|0011|0100|1011 +| heat66 | H |1000|1000|0000|0100|0100|0100|1100 +| heat68 | H |1000|1000|0000|0100|0101|0100|1101 +| heat70 | H |1000|1000|0000|0100|0110|0100|1110 +| heat72 | H |1000|1000|0000|0100|0111|0100|1111 +| heat74 | H |1000|1000|0000|0100|1000|0100|0000 +| heat76 | H |1000|1000|0000|0100|1001|0100|0001 +| heat78 | H |1000|1000|0000|0100|1011|0100|0011 +| heat80 | H |1000|1000|0000|0100|1100|0100|0100 +| heat82 | H |1000|1000|0000|0100|1101|0100|0101 +| heat84 | H |1000|1000|0000|0100|1110|0100|0110 +| heat86 | H |1000|1000|0000|0100|1111|0100|0111 + From ee067b1cb3f68ba4648281ccc087fb6beb01ee7d Mon Sep 17 00:00:00 2001 From: chaeplin Date: Thu, 27 Aug 2015 20:58:00 +0900 Subject: [PATCH 2/9] Revert "heating" This reverts commit 594722ad4d4251292c28f6ea10656bfa9d594064. --- examples/LGACSendDemo/LGACSendDemo.md | 84 +++++++-------------------- 1 file changed, 21 insertions(+), 63 deletions(-) diff --git a/examples/LGACSendDemo/LGACSendDemo.md b/examples/LGACSendDemo/LGACSendDemo.md index 3fe73c6..1bff51f 100644 --- a/examples/LGACSendDemo/LGACSendDemo.md +++ b/examples/LGACSendDemo/LGACSendDemo.md @@ -3,75 +3,33 @@ === *** === -- (0) : Cooling or Heating - (1) : fixed - (2) : fixed - (3) : special(power, swing, air clean) -- (4) : change air flow, temperature, coolingi(0)/heating(4) +- (4) : change air flow, temperature - (5) : temperature ( 15 + (5) = ) - (6) : air flow - (7) : crc ( 3 + 4 + 5 + 6 ) & B00001111 - -°F = °C × 1.8 + 32 -°C = (°F − 32) / 1.8 - - === *** === -* remote / Korea / without heating -| status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7) -|----------------|---|----|----|----|----|----|----|---- -| on / 25 / mid | C |1000|1000|0000|0000|1010|0010|1100 -| on / 26 / mid | C |1000|1000|0000|0000|1011|0010|1101 -| on / 27 / mid | C |1000|1000|0000|0000|1100|0010|1110 -| on / 28 / mid | C |1000|1000|0000|0000|1101|0010|1111 -| on / 25 / high | C |1000|1000|0000|0000|1010|0100|1110 -| on / 26 / high | C |1000|1000|0000|0000|1011|0100|1111 -| on / 27 / high | C |1000|1000|0000|0000|1100|0100|0000 -| on / 28 / high | C |1000|1000|0000|0000|1101|0100|0001 -| 1 up | C |1000|1000|0000|1000|1101|0100|1001 -| Cool power | C |1000|1000|0001|0000|0000|1100|1101 -| energy saving | C |1000|1000|0001|0000|0000|0100|0101 -| power | C |1000|1000|0001|0000|0000|1000|1001 -| flow/up/down | C |1000|1000|0001|0011|0001|0100|1001 -| up/down off | C |1000|1000|0001|0011|0001|0101|1010 -| flow/left/right| C |1000|1000|0001|0011|0001|0110|1011 -| left/right off | C |1000|1000|0001|0011|0001|0111|1100 -| Air clean | C |1000|1000|1100|0000|0000|0000|1100 -| off | C |1000|1000|1100|0000|0000|0101|0001 - - - -* remote / with heating -* converted from raw code at https://github.com/chaeplin/RaspAC/blob/master/lircd.conf - -| status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7) -|----------------|---|----|----|----|----|----|----|---- -| on | C |1000|1000|0000|0000|1011|0010|1101 -| of | C |1000|1000|1100|0000|0000|0101|0001 -|----------------|---|----|----|----|----|----|----|---- -| 64 | C |1000|1000|0000|0000|0011|0100|0111 -| 66 | C |1000|1000|0000|0000|0100|0100|1000 -| 68 | C |1000|1000|0000|0000|0101|0100|1001 -| 70 | C |1000|1000|0000|0000|0110|0100|1010 -| 72 | C |1000|1000|0000|0000|0111|0100|1011 -| 74 | C |1000|1000|0000|0000|1000|0100|1100 -| 76 | C |1000|1000|0000|0000|1010|0100|1110 -| 78 | C |1000|1000|0000|0000|1011|0100|1111 -| 80 | C |1000|1000|0000|0000|1100|0100|0000 -| 82 | C |1000|1000|0000|0000|1101|0100|0001 -| 84 | C |1000|1000|0000|0000|1110|0100|0010 -| 86 | C |1000|1000|0000|0000|1111|0100|0011 -| heat64 | H |1000|1000|0000|0100|0011|0100|1011 -| heat66 | H |1000|1000|0000|0100|0100|0100|1100 -| heat68 | H |1000|1000|0000|0100|0101|0100|1101 -| heat70 | H |1000|1000|0000|0100|0110|0100|1110 -| heat72 | H |1000|1000|0000|0100|0111|0100|1111 -| heat74 | H |1000|1000|0000|0100|1000|0100|0000 -| heat76 | H |1000|1000|0000|0100|1001|0100|0001 -| heat78 | H |1000|1000|0000|0100|1011|0100|0011 -| heat80 | H |1000|1000|0000|0100|1100|0100|0100 -| heat82 | H |1000|1000|0000|0100|1101|0100|0101 -| heat84 | H |1000|1000|0000|0100|1110|0100|0110 -| heat86 | H |1000|1000|0000|0100|1111|0100|0111 +| status | (1)| (2)| (3)| (4)| (5)| (6)| (7) +|----------------|----|----|----|----|----|----|---- +| on / 25 / mid |1000|1000|0000|0000|1010|0010|1100 +| on / 26 / mid |1000|1000|0000|0000|1011|0010|1101 +| on / 27 / mid |1000|1000|0000|0000|1100|0010|1110 +| on / 28 / mid |1000|1000|0000|0000|1101|0010|1111 +| on / 25 / high |1000|1000|0000|0000|1010|0100|1110 +| on / 26 / high |1000|1000|0000|0000|1011|0100|1111 +| on / 27 / high |1000|1000|0000|0000|1100|0100|0000 +| on / 28 / high |1000|1000|0000|0000|1101|0100|0001 +| 1 up |1000|1000|0000|1000|1101|0100|1001 +| Cool power |1000|1000|0001|0000|0000|1100|1101 +| energy saving |1000|1000|0001|0000|0000|0100|0101 +| power |1000|1000|0001|0000|0000|1000|1001 +| flow/up/down |1000|1000|0001|0011|0001|0100|1001 +| up/down off |1000|1000|0001|0011|0001|0101|1010 +| flow/left/right|1000|1000|0001|0011|0001|0110|1011 +| left/right off |1000|1000|0001|0011|0001|0111|1100 +| Air clean |1000|1000|1100|0000|0000|0000|1100 +| off |1000|1000|1100|0000|0000|0101|0001 \ No newline at end of file From 969b34fcc4284e0c1ac6a27d0964a4d4dacccea8 Mon Sep 17 00:00:00 2001 From: chaeplin Date: Thu, 27 Aug 2015 20:58:38 +0900 Subject: [PATCH 3/9] Revert "Revert "heating"" This reverts commit ee067b1cb3f68ba4648281ccc087fb6beb01ee7d. --- examples/LGACSendDemo/LGACSendDemo.md | 86 ++++++++++++++++++++------- 1 file changed, 64 insertions(+), 22 deletions(-) diff --git a/examples/LGACSendDemo/LGACSendDemo.md b/examples/LGACSendDemo/LGACSendDemo.md index 1bff51f..3fe73c6 100644 --- a/examples/LGACSendDemo/LGACSendDemo.md +++ b/examples/LGACSendDemo/LGACSendDemo.md @@ -3,33 +3,75 @@ === *** === +- (0) : Cooling or Heating - (1) : fixed - (2) : fixed - (3) : special(power, swing, air clean) -- (4) : change air flow, temperature +- (4) : change air flow, temperature, coolingi(0)/heating(4) - (5) : temperature ( 15 + (5) = ) - (6) : air flow - (7) : crc ( 3 + 4 + 5 + 6 ) & B00001111 -=== *** === -| status | (1)| (2)| (3)| (4)| (5)| (6)| (7) -|----------------|----|----|----|----|----|----|---- -| on / 25 / mid |1000|1000|0000|0000|1010|0010|1100 -| on / 26 / mid |1000|1000|0000|0000|1011|0010|1101 -| on / 27 / mid |1000|1000|0000|0000|1100|0010|1110 -| on / 28 / mid |1000|1000|0000|0000|1101|0010|1111 -| on / 25 / high |1000|1000|0000|0000|1010|0100|1110 -| on / 26 / high |1000|1000|0000|0000|1011|0100|1111 -| on / 27 / high |1000|1000|0000|0000|1100|0100|0000 -| on / 28 / high |1000|1000|0000|0000|1101|0100|0001 -| 1 up |1000|1000|0000|1000|1101|0100|1001 -| Cool power |1000|1000|0001|0000|0000|1100|1101 -| energy saving |1000|1000|0001|0000|0000|0100|0101 -| power |1000|1000|0001|0000|0000|1000|1001 -| flow/up/down |1000|1000|0001|0011|0001|0100|1001 -| up/down off |1000|1000|0001|0011|0001|0101|1010 -| flow/left/right|1000|1000|0001|0011|0001|0110|1011 -| left/right off |1000|1000|0001|0011|0001|0111|1100 -| Air clean |1000|1000|1100|0000|0000|0000|1100 -| off |1000|1000|1100|0000|0000|0101|0001 \ No newline at end of file +°F = °C × 1.8 + 32 +°C = (°F − 32) / 1.8 + + +=== *** === +* remote / Korea / without heating +| status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7) +|----------------|---|----|----|----|----|----|----|---- +| on / 25 / mid | C |1000|1000|0000|0000|1010|0010|1100 +| on / 26 / mid | C |1000|1000|0000|0000|1011|0010|1101 +| on / 27 / mid | C |1000|1000|0000|0000|1100|0010|1110 +| on / 28 / mid | C |1000|1000|0000|0000|1101|0010|1111 +| on / 25 / high | C |1000|1000|0000|0000|1010|0100|1110 +| on / 26 / high | C |1000|1000|0000|0000|1011|0100|1111 +| on / 27 / high | C |1000|1000|0000|0000|1100|0100|0000 +| on / 28 / high | C |1000|1000|0000|0000|1101|0100|0001 +| 1 up | C |1000|1000|0000|1000|1101|0100|1001 +| Cool power | C |1000|1000|0001|0000|0000|1100|1101 +| energy saving | C |1000|1000|0001|0000|0000|0100|0101 +| power | C |1000|1000|0001|0000|0000|1000|1001 +| flow/up/down | C |1000|1000|0001|0011|0001|0100|1001 +| up/down off | C |1000|1000|0001|0011|0001|0101|1010 +| flow/left/right| C |1000|1000|0001|0011|0001|0110|1011 +| left/right off | C |1000|1000|0001|0011|0001|0111|1100 +| Air clean | C |1000|1000|1100|0000|0000|0000|1100 +| off | C |1000|1000|1100|0000|0000|0101|0001 + + + +* remote / with heating +* converted from raw code at https://github.com/chaeplin/RaspAC/blob/master/lircd.conf + +| status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7) +|----------------|---|----|----|----|----|----|----|---- +| on | C |1000|1000|0000|0000|1011|0010|1101 +| of | C |1000|1000|1100|0000|0000|0101|0001 +|----------------|---|----|----|----|----|----|----|---- +| 64 | C |1000|1000|0000|0000|0011|0100|0111 +| 66 | C |1000|1000|0000|0000|0100|0100|1000 +| 68 | C |1000|1000|0000|0000|0101|0100|1001 +| 70 | C |1000|1000|0000|0000|0110|0100|1010 +| 72 | C |1000|1000|0000|0000|0111|0100|1011 +| 74 | C |1000|1000|0000|0000|1000|0100|1100 +| 76 | C |1000|1000|0000|0000|1010|0100|1110 +| 78 | C |1000|1000|0000|0000|1011|0100|1111 +| 80 | C |1000|1000|0000|0000|1100|0100|0000 +| 82 | C |1000|1000|0000|0000|1101|0100|0001 +| 84 | C |1000|1000|0000|0000|1110|0100|0010 +| 86 | C |1000|1000|0000|0000|1111|0100|0011 +| heat64 | H |1000|1000|0000|0100|0011|0100|1011 +| heat66 | H |1000|1000|0000|0100|0100|0100|1100 +| heat68 | H |1000|1000|0000|0100|0101|0100|1101 +| heat70 | H |1000|1000|0000|0100|0110|0100|1110 +| heat72 | H |1000|1000|0000|0100|0111|0100|1111 +| heat74 | H |1000|1000|0000|0100|1000|0100|0000 +| heat76 | H |1000|1000|0000|0100|1001|0100|0001 +| heat78 | H |1000|1000|0000|0100|1011|0100|0011 +| heat80 | H |1000|1000|0000|0100|1100|0100|0100 +| heat82 | H |1000|1000|0000|0100|1101|0100|0101 +| heat84 | H |1000|1000|0000|0100|1110|0100|0110 +| heat86 | H |1000|1000|0000|0100|1111|0100|0111 + From 0f03eeeaf23bbafbd443eed1625e9971eae0c7ad Mon Sep 17 00:00:00 2001 From: chaeplin Date: Thu, 27 Aug 2015 21:01:26 +0900 Subject: [PATCH 4/9] heating --- examples/LGACSendDemo/LGACSendDemo.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/LGACSendDemo/LGACSendDemo.md b/examples/LGACSendDemo/LGACSendDemo.md index 3fe73c6..4ed3042 100644 --- a/examples/LGACSendDemo/LGACSendDemo.md +++ b/examples/LGACSendDemo/LGACSendDemo.md @@ -1,5 +1,6 @@ -1) Sample raw code : https://gist.github.com/chaeplin/ab2a7ad1533c41260f0d -2) send raw code : https://gist.github.com/chaeplin/7c800d3166463bb51be4 +=== *** === +- 1) Sample raw code : https://gist.github.com/chaeplin/ab2a7ad1533c41260f0d +- 2) send raw code : https://gist.github.com/chaeplin/7c800d3166463bb51be4 === *** === @@ -19,6 +20,7 @@ === *** === * remote / Korea / without heating + | status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7) |----------------|---|----|----|----|----|----|----|---- | on / 25 / mid | C |1000|1000|0000|0000|1010|0010|1100 @@ -28,7 +30,8 @@ | on / 25 / high | C |1000|1000|0000|0000|1010|0100|1110 | on / 26 / high | C |1000|1000|0000|0000|1011|0100|1111 | on / 27 / high | C |1000|1000|0000|0000|1100|0100|0000 -| on / 28 / high | C |1000|1000|0000|0000|1101|0100|0001 +| on / 28 / high | C |1000|1000|0000|0000|1101|0100|0001 +|----------------|---|----|----|----|----|----|----|---- | 1 up | C |1000|1000|0000|1000|1101|0100|1001 | Cool power | C |1000|1000|0001|0000|0000|1100|1101 | energy saving | C |1000|1000|0001|0000|0000|0100|0101 @@ -74,4 +77,3 @@ | heat82 | H |1000|1000|0000|0100|1101|0100|0101 | heat84 | H |1000|1000|0000|0100|1110|0100|0110 | heat86 | H |1000|1000|0000|0100|1111|0100|0111 - From 72d3d4dc26bdb16a6a8d0d522793637c5d9da4ca Mon Sep 17 00:00:00 2001 From: chaeplin Date: Thu, 27 Aug 2015 21:04:34 +0900 Subject: [PATCH 5/9] typo --- examples/LGACSendDemo/LGACSendDemo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/LGACSendDemo/LGACSendDemo.md b/examples/LGACSendDemo/LGACSendDemo.md index 4ed3042..230701a 100644 --- a/examples/LGACSendDemo/LGACSendDemo.md +++ b/examples/LGACSendDemo/LGACSendDemo.md @@ -8,7 +8,7 @@ - (1) : fixed - (2) : fixed - (3) : special(power, swing, air clean) -- (4) : change air flow, temperature, coolingi(0)/heating(4) +- (4) : change air flow, temperature, cooling(0)/heating(4) - (5) : temperature ( 15 + (5) = ) - (6) : air flow - (7) : crc ( 3 + 4 + 5 + 6 ) & B00001111 From ac1b2d28dd45cd6acc45738d04103241b11fe704 Mon Sep 17 00:00:00 2001 From: chaeplin Date: Thu, 27 Aug 2015 21:09:30 +0900 Subject: [PATCH 6/9] add heating --- examples/LGACSendDemo/LGACSendDemo.ino | 28 ++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/examples/LGACSendDemo/LGACSendDemo.ino b/examples/LGACSendDemo/LGACSendDemo.ino index 66d5025..8dfb804 100644 --- a/examples/LGACSendDemo/LGACSendDemo.ino +++ b/examples/LGACSendDemo/LGACSendDemo.ino @@ -10,6 +10,11 @@ IRrecv irrecv (RECV_PIN); const int AC_TYPE = 0; // 0 : TOWER // 1 : WALL +// + +const int AC_HEAT = 0; +// 0 : cooling +// 1 : heating int AC_POWER_ON = 0; // 0 : off @@ -27,6 +32,8 @@ int AC_FLOW = 1; // 1 : mid // 2 : high // if AC_TYPE =1, 3 : change +// + const int AC_FLOW_TOWER[3] = {0, 4, 6}; 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_MSBITS2 = 8; 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_MSBITS6 ; @@ -131,13 +143,13 @@ void setup() Serial.println(" - - - T E S T - - - "); -/* test - ac_activate(25, 1); - delay(5000); - ac_activate(27, 2); - delay(5000); + /* test + ac_activate(25, 1); + delay(5000); + ac_activate(27, 2); + delay(5000); -*/ + */ } void loop() @@ -149,7 +161,7 @@ void loop() ac_activate(27, 0); delay(5000); - + if ( r != o_r) { /* From 67f0bf2f9a299c6dee752cc73af8fa6b7e31c3c5 Mon Sep 17 00:00:00 2001 From: chaeplin Date: Fri, 28 Aug 2015 03:36:26 +0900 Subject: [PATCH 7/9] Fahrenheit --- examples/LGACSendDemo/LGACSendDemo.ino | 6 ++-- examples/LGACSendDemo/LGACSendDemo.md | 39 +++++++++++++++----------- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/examples/LGACSendDemo/LGACSendDemo.ino b/examples/LGACSendDemo/LGACSendDemo.ino index 8dfb804..da5db37 100644 --- a/examples/LGACSendDemo/LGACSendDemo.ino +++ b/examples/LGACSendDemo/LGACSendDemo.ino @@ -12,7 +12,7 @@ const int AC_TYPE = 0; // 1 : WALL // -const int AC_HEAT = 0; +int AC_HEAT = 0; // 0 : cooling // 1 : heating @@ -63,8 +63,10 @@ void ac_activate(int temperature, int air_flow) int AC_MSBITS3 = 0; int AC_MSBITS4 ; if ( AC_HEAT == 1 ) { + // heating AC_MSBITS4 = 4; } else { + // cooling AC_MSBITS4 = 0; } int AC_MSBITS5 = temperature - 15; @@ -165,7 +167,7 @@ void loop() if ( r != o_r) { /* - # a : mode or temp b : air_flow, temp, swing, clean + # a : mode or temp b : air_flow, temp, swing, clean, cooling/heating # 18 ~ 30 : temp 0 ~ 2 : flow // on # 0 : off 0 # 1 : on 0 diff --git a/examples/LGACSendDemo/LGACSendDemo.md b/examples/LGACSendDemo/LGACSendDemo.md index 230701a..7f859d1 100644 --- a/examples/LGACSendDemo/LGACSendDemo.md +++ b/examples/LGACSendDemo/LGACSendDemo.md @@ -32,39 +32,44 @@ | on / 27 / high | C |1000|1000|0000|0000|1100|0100|0000 | on / 28 / high | C |1000|1000|0000|0000|1101|0100|0001 |----------------|---|----|----|----|----|----|----|---- -| 1 up | C |1000|1000|0000|1000|1101|0100|1001 +| 1 up | C |1000|1000|0000|1000|1101|0100|1001 +|----------------|---|----|----|----|----|----|----|---- | Cool power | C |1000|1000|0001|0000|0000|1100|1101 | energy saving | C |1000|1000|0001|0000|0000|0100|0101 | power | C |1000|1000|0001|0000|0000|1000|1001 | flow/up/down | C |1000|1000|0001|0011|0001|0100|1001 | up/down off | C |1000|1000|0001|0011|0001|0101|1010 | flow/left/right| C |1000|1000|0001|0011|0001|0110|1011 -| left/right off | C |1000|1000|0001|0011|0001|0111|1100 -| Air clean | C |1000|1000|1100|0000|0000|0000|1100 +| left/right off | C |1000|1000|0001|0011|0001|0111|1100 +|----------------|---|----|----|----|----|----|----|---- +| Air clean | C |1000|1000|1100|0000|0000|0000|1100 +|----------------|---|----|----|----|----|----|----|---- | off | C |1000|1000|1100|0000|0000|0101|0001 * remote / with heating -* converted from raw code at https://github.com/chaeplin/RaspAC/blob/master/lircd.conf +* converted using raw code at https://github.com/chaeplin/RaspAC/blob/master/lircd.conf | status |(0)| (1)| (2)| (3)| (4)| (5)| (6)| (7) |----------------|---|----|----|----|----|----|----|---- | on | C |1000|1000|0000|0000|1011|0010|1101 -| of | C |1000|1000|1100|0000|0000|0101|0001 |----------------|---|----|----|----|----|----|----|---- -| 64 | C |1000|1000|0000|0000|0011|0100|0111 -| 66 | C |1000|1000|0000|0000|0100|0100|1000 -| 68 | C |1000|1000|0000|0000|0101|0100|1001 -| 70 | C |1000|1000|0000|0000|0110|0100|1010 -| 72 | C |1000|1000|0000|0000|0111|0100|1011 -| 74 | C |1000|1000|0000|0000|1000|0100|1100 -| 76 | C |1000|1000|0000|0000|1010|0100|1110 -| 78 | C |1000|1000|0000|0000|1011|0100|1111 -| 80 | C |1000|1000|0000|0000|1100|0100|0000 -| 82 | C |1000|1000|0000|0000|1101|0100|0001 -| 84 | C |1000|1000|0000|0000|1110|0100|0010 -| 86 | C |1000|1000|0000|0000|1111|0100|0011 +| off | C |1000|1000|1100|0000|0000|0101|0001 +|----------------|---|----|----|----|----|----|----|---- +| 64 / 18 | C |1000|1000|0000|0000|0011|0100|0111 +| 66 / 19 | C |1000|1000|0000|0000|0100|0100|1000 +| 68 / 20 | C |1000|1000|0000|0000|0101|0100|1001 +| 70 / 21 | C |1000|1000|0000|0000|0110|0100|1010 +| 72 / 22 | C |1000|1000|0000|0000|0111|0100|1011 +| 74 / 23 | C |1000|1000|0000|0000|1000|0100|1100 +| 76 / 25 | C |1000|1000|0000|0000|1010|0100|1110 +| 78 / 26 | C |1000|1000|0000|0000|1011|0100|1111 +| 80 / 27 | C |1000|1000|0000|0000|1100|0100|0000 +| 82 / 28 | C |1000|1000|0000|0000|1101|0100|0001 +| 84 / 29 | C |1000|1000|0000|0000|1110|0100|0010 +| 86 / 20 | C |1000|1000|0000|0000|1111|0100|0011 +|----------------|---|----|----|----|----|----|----|---- | heat64 | H |1000|1000|0000|0100|0011|0100|1011 | heat66 | H |1000|1000|0000|0100|0100|0100|1100 | heat68 | H |1000|1000|0000|0100|0101|0100|1101 From 79d9cc78c52c1ce834407ba463f5e730006a7767 Mon Sep 17 00:00:00 2001 From: chaeplin Date: Fri, 28 Aug 2015 04:02:47 +0900 Subject: [PATCH 8/9] decoding for LG A/C --- examples/LGACSendDemo/LGACSendDemo.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/examples/LGACSendDemo/LGACSendDemo.md b/examples/LGACSendDemo/LGACSendDemo.md index 7f859d1..c82a22b 100644 --- a/examples/LGACSendDemo/LGACSendDemo.md +++ b/examples/LGACSendDemo/LGACSendDemo.md @@ -1,3 +1,12 @@ +=== decoding for LG A/C ==== +- 1) remote of LG AC has two type of HDR mark/space, 8000/4000 and 3100/10000 +- 2) HDR 8000/4000 is decoded using decodeLG(IRrecvDumpV2) without problem +- 3) for HDR 3100/10000, use AnalysIR's code : http://www.analysir.com/blog/2014/03/19/air-conditioners-problems-recording-long-infrared-remote-control-signals-arduino/ +- 4) for bin output based on AnalysIR's code : https://gist.github.com/chaeplin/a3a4b4b6b887c663bfe8 +- 5) remove first two byte(11) +- 6) sample rawcode with bin output : https://gist.github.com/chaeplin/134d232e0b8cfb898860 + + === *** === - 1) Sample raw code : https://gist.github.com/chaeplin/ab2a7ad1533c41260f0d - 2) send raw code : https://gist.github.com/chaeplin/7c800d3166463bb51be4 From c326a4e0738abfded23c39e0fff91d1fa9ac9a82 Mon Sep 17 00:00:00 2001 From: chaeplin Date: Fri, 28 Aug 2015 04:15:04 +0900 Subject: [PATCH 9/9] typo 86 / 30 --- examples/LGACSendDemo/LGACSendDemo.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/LGACSendDemo/LGACSendDemo.md b/examples/LGACSendDemo/LGACSendDemo.md index c82a22b..62c7073 100644 --- a/examples/LGACSendDemo/LGACSendDemo.md +++ b/examples/LGACSendDemo/LGACSendDemo.md @@ -77,7 +77,7 @@ | 80 / 27 | C |1000|1000|0000|0000|1100|0100|0000 | 82 / 28 | C |1000|1000|0000|0000|1101|0100|0001 | 84 / 29 | C |1000|1000|0000|0000|1110|0100|0010 -| 86 / 20 | C |1000|1000|0000|0000|1111|0100|0011 +| 86 / 30 | C |1000|1000|0000|0000|1111|0100|0011 |----------------|---|----|----|----|----|----|----|---- | heat64 | H |1000|1000|0000|0100|0011|0100|1011 | heat66 | H |1000|1000|0000|0100|0100|0100|1100