RC5 on the Megaboard


I am using this program for the Arduino Megaboard but it is not working.

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
irrecv.enableIRIn(); // Start the receiver

void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value

So can somebody help me?


How do you know it isn't working?

Hallo AWOL

When i send a RC5 command there is no respons on my screen.
Serial.println(results.value, HEX);


Have you started the serial monitor?

Is it set to 9600 baud?

How have you wired it up?

What do you mean by this exactly: "When i send a RC5 command"? Do you have a remote, and you hold it close the the IR receiver, and you press a button?

Which IR receiver did you choose?

Which remote are you using?

Hallo all.

Thanks Nick Gammon for asking these questions.
It helps me a lot.
It is now OK. The baudrate was'n set right.