hey guys some help?

hey guys im new to the forum and am having some issues…im trying to recreate user Furqan’s project
it some remote controlled leds the problem is when i paste the code i get the following error: :astonished:

sketch_mar25a.cpp:12:10: error: #include expects “FILENAME” or
sketch_mar25a:22: error: ‘decode_results’ does not name a type
sketch_mar25a.cpp: In function ‘void setup()’:
sketch_mar25a:27: error: ‘irrecv’ was not declared in this scope
sketch_mar25a.cpp: In function ‘void loop()’:
sketch_mar25a:37: error: ‘irrecv’ was not declared in this scope
sketch_mar25a:37: error: ‘ampresults’ was not declared in this scope
sketch_mar25a:38: error: ‘results’ was not declared in this scope

here is the code

/*   5 Channel ir remote control
    Created by Asghar Furqan
    A fully open-sourse program!

---------------------------------------------------------
circuit:
ir module connected to pin 2(Digital)
led 1-2-3-4-5 connected to pin 3-4-5-6-7
*/



#include <IRremote.h>

int RECV_PIN = 2;
int led1 =  7;
int led2 =  3;
int led3 =  4;
int led4 =  5;
int led5 =  6;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
{
 Serial.begin(9600);
 irrecv.enableIRIn(); // Start the ir receiver
 pinMode(led1, OUTPUT); 
 pinMode(led2, OUTPUT); 
 pinMode(led3, OUTPUT); 
 pinMode(led4, OUTPUT); 
 pinMode(led5, OUTPUT); 
}

void loop() {


 if (irrecv.decode(&results)) {
   Serial.println(results.value, DEC);


   if(results.value == 16705559)  //if you want to configure with your remote controll change the results.value
     digitalWrite(led1, HIGH);   // set the LED on  
  if (irrecv.decode(&results)) {
   Serial.println(results.value, DEC);
  if(results.value == 16656599)
     digitalWrite(led1, LOW);   // set the LED off
     
   irrecv.resume(); // Receive the next value
   
   if(results.value == 16672919)
     digitalWrite(led2, HIGH);   // set the LED on
   if(results.value == 16697399)
     digitalWrite(led2, LOW);   // set the LED off

   irrecv.resume(); // Receive the next value 
   
   if(results.value == 16689239)
     digitalWrite(led3, HIGH);   // set the LED on
   if(results.value == 16664759)
     digitalWrite(led3, LOW);   // set the LED off
  
  irrecv.resume(); // Receive the next value 
  
   if(results.value == 16668839)
     digitalWrite(led4, HIGH);   // set the LED on
   if(results.value == 16676999)
     digitalWrite(led4, LOW);   // set the LED off
  
  irrecv.resume(); // Receive the next value 
  
   if(results.value == 16674959)
     digitalWrite(led5, HIGH);   // set the LED on
   if(results.value == 16650479)
     digitalWrite(led5, LOW);   // set the LED off
  
  irrecv.resume(); // Receive the next value 
  
 }

 }
}

also my ir reciever get really hot fast it seems to be pretty standard there are no product markings on it, its black and has 3 pins i pulled it off a dvd player

any help or guidance would be appreciated thanks!

Do you have copied the file - IRremote.h ? It is porbably part of a library you need to use

Please modify your message, select the code and press the # button for proper layout, thanx

At the top of the code, it says #include<IRremote.h>. This adds the functions of IR remote to your code. Check that you have th IR remote library in yout libraries file, then try again. (You will have to restart the IDE to get the new library to work).
Without having the library “IR remote” in your folder, the IDE will be looking for something that is not there, and it will not work.

Onions.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251570417

Would be a good start…

thanks guys adding the library's solved the problem

it is receiving the remote signals now...just cant seem to get the leds to light up...i will plug away at it some more i guess

again thanks for the quick help! :grin:

just cant seem to get the leds to light up

IR means infraRed - you can't see them - or are you a superhero ;)

Serious,

if(results.value == 16705559L) ==> needs an L for Long 16705559L

maybe that helps?