How can i get (Mode/FanSpeed/Temp) from IRrecv results after decoding #2164
-
Great library, everything works. But I'm stuck on a small problem. I want to receive the statuses encoded in the IR remote separately. IRrecv irrecv(kRecvPin, kCaptureBufferSize, kTimeout, true); decode_results results;
void setup() {
irrecv.enableIRIn();
Serial.begin(74880);
delay(200);
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(resultToHexidecimal(&results)); // 0x2C09205000200010
Serial.println(IRAcUtils::resultAcToString(&results)); // Model: 2 (YBOFB), Power: On, Mode: 4 (Heat), Temp: 25C, Fan: 2 (Medium) .....
}
} how can i get only "Mode" or only "Fan" from "results"? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
First off, I noticed the above, you should check out: https://github.com/crankyoldgit/IRremoteESP8266/wiki/Frequently-Asked-Questions#user-content-Some_of_the_examples_dont_produce_output_that_I_expect_and_I_have_to_use_a_baud_rate_of_74880_Whats_up Your board needs to be fixed, or replaced. Next, how to get specific aspects of an AC message in a programatic way ... IRremoteESP8266/test/ir_Daikin_test.cpp Lines 3824 to 3837 in 9bdf8ab In short, you neet to use the "getters" (e.g. You can also look at how Lines 4061 to 4073 in 9bdf8ab and add something like the follow after the ac.setRaw() call:
uint16_t mode;
mode = ac.getMode(); |
Beta Was this translation helpful? Give feedback.
-
Thank you. It helped. Everything works
} |
Beta Was this translation helpful? Give feedback.
First off, I noticed the above, you should check out: https://github.com/crankyoldgit/IRremoteESP8266/wiki/Frequently-Asked-Questions#user-content-Some_of_the_examples_dont_produce_output_that_I_expect_and_I_have_to_use_a_baud_rate_of_74880_Whats_up
Your board needs to be fixed, or replaced.
Next, how to get specific aspects of an AC message in a programatic way ...
See:
IRremoteESP8266/test/ir_Daikin_test.cpp
Lines 3824 to 3837 in 9bdf8ab