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 :-/