I'm new t arduino...serial monitor just keeps scrolling

I am trying to decode an IR Remote from my kit…in the serial monitor I get a repeating message that says,

The function decode (&results) is deprecated and may not work as expected! Just use decode () - without any parameter.

Not sure what this means and it is popping this message several times a second and I get no information from my remote…

I am using this code

#include <IRremote.h> //including infrared remote header file

int RECV_PIN = 11; // the pin where you connect the output pin of IR sensor
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
Serial.begin(9600);
irrecv.enableIRIn();
}

void loop()
{
if (irrecv.decode(&results))
{
int value = results.value;
Serial.println(" ");
Serial.print(“Code: “);
Serial.println(results.value); //prints the value a a button press
Serial.println(” “);
irrecv.resume(); // Receive the next value
Serial.println(”*****************”);
}
}

Any suggestions on how to get this to work?

 if (irrecv.decode(&results))

replace with

 if (irrecv.decode())

I would try starting with one of the examples that came with the library:
File->Examples->IRremote->
Then modify the example to do what you want.

Thank you!

I did that and the scrolling stopped…I now get this in the serial monitor when I push a button on my remote…

It does that no matter what button or remote I use.

"This" probably disappeared. I opened the library and deprecated is probably the most used word in there. Look at answers under the first question.

Hey so I know this is a little old but can someone help me with this topic still??
I have a project that I need to get going like asap. It involves an IR transmitter and an IR receiver. All it does is just count and add one every time the beam between the two is broken.
-Thanks keaton

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.