Featured on Hack A Day! http://hackaday.com/2011/12/18/controlling-your-christmas-lights-without-ever-getting-off-the-couch/#more-63515
I finally started to get tired of plugging and unplugging the Christmas Tree and decided to do something about it. I took my arduino powered Christmas light controller and paired it with an IR receiver I found in an old DVD/VCR combo. I used two buttons on my remote control that are never used so it won't interfere with the TV. Now I can control the TV and the tree from the same remote. I cleverly disguised the box as a present. Here is the code for the arduino, the schematic for the IR receiver and where you can find instructions for building the original Christmas light controller
NOTE: you will need to follow the first few steps on this instructable to recreate this project because there is a library to download.
http://www.instructables.com/id/3-Channel-arduino-Powered-Christmas-Light-Controll/
#include <IRremote.h>
int RECV_PIN = 2;
boolean is_on = 0;
IRrecv irrecv(RECV_PIN);
decode_results results;
void setup()
{
pinMode(10,OUTPUT);
pinMode(13,OUTPUT);
Serial.begin(9600);
irrecv.enableIRIn(); // Start the receiver
}
void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, DEC);
irrecv.resume(); // Receive the next value
}
if (results.value == 551543325)
{
digitalWrite(10,HIGH);
digitalWrite(13,HIGH);
}
if (results.value == 551490285)
{
digitalWrite(10,LOW);
digitalWrite(13,LOW);
}
}

Sweet, nice job! I like how you used an existing remote, so it has a double use and you don't need a separate remote lying around. Keep it up! I was thinking about doing this project with a Power Switch Tail from Adafruit.
ReplyDeleteBen, noeticbrainwaves.blogspot.com
Hi, i am also 14 and am into electronics alot. I was wondering if the code for this project will work with any remote. If not could you tell me how to get it to work with a rca brand universal remote. I have never used ir in my projects but do know how to read schematics and such and i understand arduino code for the most part. I also have aready made a custom 8 channle relay board. Thanks for the help, from wyatt
ReplyDelete