Infrared Library

Hi i'm using the irremote library.
Check this website: A Multi-Protocol Infrared Remote Library for the Arduino

I read some values from my remote but when i decided to use them to turn on an LED i failed.

The Code:

/*
 * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv
 * An IR detector/demodulator must be connected to the input RECV_PIN.
 * Version 0.1 July, 2009
 * Copyright 2009 Ken Shirriff
 * http://arcfn.com
 */

#include <IRremote.h>

int RECV_PIN = 11;

IRrecv irrecv(RECV_PIN);
decode_results results;

void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    switch (results.value){
    case 768928D7 : //My remote's off key
    digitalWrite(13,HIGH);
    break;
    }
    delay(200); //A simple delay because it reads a lot of values in a press of a button
    irrecv.resume(); // Receive the next value
    }  
  }
}

When i try to upload it, it gives me an error:
10: error: invalid suffix "D7" on integer constant

Please Help Me. As simple as Possible. Newbie Here :-/

I assume 768928D7 is a HEX value. Try the following change in your code.

    case [glow]0x[/glow]768928D7 : //My remote's off key

/Henning

But if i do that it wont recognise the value....because the value is 7...D7 not 0x7...D7

The 0x prefix simply means that the following number is in HEX-coding. If you do not use 0x in front it expects a decimal number, and as you probably know, decimal numbers cannot contain 'D's.

/Henning

Thanks a lot men. I try it and it worked. Thank you very much.

/Greece