Questions are rarely stupid, but some are hard to answer. I haven't got enough information to answer yours at the moment. So, my questions are:
did you follow these instructions:
This is the IRremote library for the Arduino.
To download from github (http://github.com/shirriff/Arduino-IRremote), click on the "Downloads" link in the upper right, click "Download as zip", and get a zip file. Unzip it and rename the directory shirriff-Arduino-IRremote-nnn to IRremote
To install, move the downloaded IRremote directory to:
arduino-1.x/libraries/IRremote
where arduino-1.x is your Arduino installation directory
After installation you should have files such as:
arduino-1.x/libraries/IRremote/IRremote.cpp
Then, did you try the program examples/IRrecvDemo:
#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
}
}
The error "Error compiling" can indicate many things not working, so we need some more information to help you.
Where should I put the IR code if I want to do stuff like: "if it read that IR code then do that"
void loop()
{
if (irrecv.decode(&results))
{
Serial.println(results.value, HEX);
if(results.value == valueForButton1)
{
// do one thing
}
else if(results.value == valueForButton2)
{
// do something else
}
// etc.
irrecv.resume(); // Receive the next value
}
}
Some proof that the remote control sends a 1045C would be useful. Some proof that the value in results.value was 1045C would be useful. Some clue as to how you defined the variable 1045C would be good.
You obviously haven't tried everything. What does the error message say exactly ?
Look at my code, look at your code. Is the line that does the test for a code significantly different apart from the code being used ? The 0x at the start of my values being checked for may be significant.....
Her is something else I did'n get to work, on this code it said "done upload" put it was a red text who said "avrdude: stk500_getsync(): not in sync: resp=0x30"