1

I have a piece of code that captures input from infrared and spits it out to the serial port.

When I use it with a simple controller that comes with a typical kit, it receives the infrared code just fine for each button I depress.

But when I try and capture information from my air conditioning remote (the one I need to clone), I receive the first hexcode and then the output gets thrown into an infinite loop with that 1 hexcode, and will not break out.

#include <IRremote.h>
    
const int RECV_PIN = 7;
IRrecv irrecv(RECV_PIN);
decode_results results;
    
void setup() {
  Serial.begin(115200);
  irrecv.enableIRIn();
  irrecv.blink13(true);
}
    
void loop(){
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume();
  }
}

What is causing the infinite loop from "some" controllers and how do I prevent it?

Update:

In changelog they say they renamed RAW_BUF to RAW_BUFFER_LENGTH. I find RAW_BUFFER_LENGTH in IRremoteInt.h and not IRremote.h

I'm not calling on IRremoteInt.h

I did try and reset the buffer from 101 to 201 in IRremoteInt.h, recompiled, uploaded, same issue.

7
  • 1
    some air conditioners have really long bit sequences ... they can also use error checking Commented Jan 14, 2021 at 0:24
  • @jsotola That sounds very plausible. How do I capter all of it? Commented Jan 14, 2021 at 0:47
  • @jsotola Quilo model QP114 Commented Jan 14, 2021 at 1:07
  • try this to capture all of the bit stream ... stackoverflow.com/questions/22751255/… Commented Jan 14, 2021 at 2:15
  • @jsotola The code from that page performs a much more robust infinite loop, but still the same infinite loop. In the answers they mention #define RAWBUF 100. That does not exist in my IRremote.h Commented Jan 14, 2021 at 2:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.