Arduino IR Repeater
Problem is a simple one. My entertainment system cabinet is poorly positioned for convenient remote control use. Solution is to put a IR phototransistor directly beneath the TV (actually smack dab in the middle of the Wii sensor bar) and an IR LED in front of the equipment.
Hardware is done. Not much to it. IR emitter and detector, each with a NPN transistor.
(Click schematic for source website). The pictured LED & its current limiter has been removed and is just a digital input presently. Yes I know the IR LED could go there, and I wouldn’t need an Arduino at all for this project, but where is the fun in that?
Right now the sketch is absurdly simple. But it does demonstrate Arduino interrupt handling. Ultimately the goal is to add the ability to decode the IR signals, and do several things with it. First is to run some macros. IE, a single button push turns on all devices and switches everything to the appropriate inputs. Secondly, I’d like to control my linux box via remote control too since it will eventually be my media center.
int ledPin = 4; // LED connected int sensePin = 2; // This is the INT0 Pin of the ATMega8/168 volatile int value = 0; // Sense value void setup() { // Serial.begin(9600); // Serial.println("Initializing handler"); pinMode(ledPin, OUTPUT); // sets the digital pin as output pinMode(sensePin, INPUT); // read from the sense pin attachInterrupt(0, state, CHANGE); // Serial.println("Finished initialization"); } void loop() { } void state() { value = !value; // Serial.println("change"); digitalWrite(ledPin, value); }Explore posts in the same categories: arduino
January 9, 2010 at 11:34 am
did you dril into the wii bar to block daylight?
January 9, 2010 at 11:25 pm
No I didn’t – and I probably should have. Ambient light was a real problem and I ended up abandoning the IR transistor route and went straight for digital IR receiver with a built in filter. https://rcaron.wordpress.com/2009/06/14/arduino-ir-update/ for more info