Hello
Today i've re build my old project.
Here is the schematic :
You can use any type of ir receiver with your arduino, i've use an old ir receiver form my brooked tv.
after Wiring up all upload this code into your Arduino:
/* 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
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
}
}
}
Today i've re build my old project.
Here is the schematic :
You can use any type of ir receiver with your arduino, i've use an old ir receiver form my brooked tv.
after Wiring up all upload this code into your Arduino:
/* 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
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
}
}
}
Tags:
Arduino projects
will all this work for an arduino uno r3 as well?
NO WORKING PROGRAM
If you want to help then appears a program that works .. not this shit
Program is working just need install libraries https://github.com/shirriff/Arduino-IRremote
ok .. my apologies for the last comment .. usually has a lot of similar programs that work or do not work either ... but the program does not work .. I have installed the library. A fault occurs when compiled.
at thy video clip works .. ok. it does not matter, mainly my remote works but with another program. in a way that I wanted .. It is a Sony remote control,, ok, once again, my apologies.
best regards
hi
that replenished itself .. your right to post what you want, my big mistake that I was tired of studying the remotes, so I wrote what in any case I could not write. Again, I tried your code in Arduino version, 0022,1,0 and 1,0,4 .. not a compilation, as well as the same one I wrote above. but ok, and that your code was ok, would not help me. I've reviewed many, many, video clips, tutorials, and in the end I wrote my code, of course, was my most difficult start - defining pins etc.., but I managed and doing what I need for my project. need to work as a TV, I do not like about you on / off. My code has the power - on / off, volume control, channel up / down, etc. .. ok .. that's all.
Its working but you must change this line : #include
This type : #include
This web page is, hide some codes.
use this line: #include yIRremote.hx
But change x to >
and change y to <
Its not working in Freeduino uno 1.0.......its shows error in (IRrecv does not name a type)...i installed library ir remote..but still not working..plz help to fix this problem...
Codes and Frequenzy of IR Sensor needs to match values from IR transmitter- than it should work...
Hi, results.value == 16705559) //if you want to configure with your remote controll change the results.value. Where we get these value.
could also connect each LED with a pushbutton?