good afternoon to all of you who is giving there time to look at my post
im trying to decode my Tv remotes in my house but i ran in to some problems
#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);
irrecv.resume(); // Receive the next value
}
i used this code to get my Readings from my remotes and got
(C5E8) and (FFFFFFFF) after and when i hold down
now my problem is when i want to send this signal out with my LED (IR) and try to upload the program i get an error
#include <IRremote.h>
int IRpin = 11; // pin for the IR sensor
int LED = 13; // LED pin
IRrecv irrecv(IRpin);
decode_results results;
boolean LEDon = true; // initializing LEDon as true
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
pinMode(LED, OUTPUT);
}
void loop()
{
if (irrecv.decode(&results))
{
irrecv.resume(); // Receive the next value
}
switch(results.value)
{
case C5E8:
Serial.print("OFF");
break;
case 02:
// do another thing
break;
case 03:
// feed my dog for me
break;
default:
digitalWrite(LED, HIGH);
}
}
The error i get is
Arduino: 1.6.3 (Windows 8.1), Board: "Arduino Mega or Mega 2560, ATmega1280"
sketch_apr30a.ino:31:8: error: invalid suffix "Arduino: 1.6.3 (Windows 8.1), Board: "Arduino Mega or Mega 2560, ATmega1280"
sketch_apr30a.ino:31:8: error: invalid suffix "C750AF" on integer constant
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
" on integer constant
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
now i do not know alot of code but i do know that a Hex can not be in a (int) so is there a way for me to force to read the Hex code and still be able to send it out to the LED (IR) without any problem and will love if i can keep my Case option
have a good day
Clipcomet