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.

brad
  • 201
  • 1
  • 13

0 Answers0