Hey all, im trying to do repeater for IR TV remote control. What I want to do is to record the IR pulse of spesific button (w/o caring what the encoding is) and tem play it back when i want to. ex so i can turn of TV if im not at home :)
Should of been easy project, but something is not right here :( I went and got IR reviver and transmiter from radio shack and put them in as Button and LED. OK so far now i used this script to record readings (http://www.arduino.cc/playground/Code/InfraredReceivers)
Then i made small program to re-send collected data in givven intervales.... now here comes the prpblem, it does not work :)
I send data to IR LED but TV does not turn on when i send the command :(
Any one can help me out?
My code to send IRs
int ledPin = 12; // LED connected to digital pin 13
// The setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pin as an output:
pinMode(ledPin, OUTPUT);
}
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop()
{
IR_SEND(4, 0);
IR_SEND(191668, 0);
IR_SEND(191668, 1);
IR_SEND(191692, 1);
IR_SEND(191692, 0);
IR_SEND(191696, 0);
IR_SEND(191696, 1);
IR_SEND(191720, 1);
IR_SEND(191720, 0);
IR_SEND(191728, 0);
IR_SEND(191728, 1);
IR_SEND(191744, 1);
IR_SEND(191744, 0);
IR_SEND(191752, 0);
IR_SEND(191752, 1);
IR_SEND(191772, 1);
IR_SEND(191772, 0);
IR_SEND(191780, 0);
IR_SEND(191780, 1);
IR_SEND(191796, 1);
IR_SEND(191796, 0);
IR_SEND(191804, 0);
IR_SEND(191804, 1);
IR_SEND(191824, 1);
IR_SEND(191824, 0);
IR_SEND(191832, 0);
IR_SEND(191832, 1);
IR_SEND(191852, 1);
IR_SEND(191852, 0);
IR_SEND(191856, 0);
IR_SEND(191856, 1);
IR_SEND(191880, 1);
IR_SEND(191880, 0);
IR_SEND(191884, 0);
IR_SEND(191884, 1);
IR_SEND(191904, 1);
IR_SEND(191904, 0);
IR_SEND(191908, 0);
IR_SEND(191908, 1);
IR_SEND(191932, 1);
IR_SEND(191932, 0);
IR_SEND(191936, 0);
IR_SEND(191936, 1);
IR_SEND(191956, 1);
IR_SEND(191956, 0);
IR_SEND(191960, 0);
IR_SEND(191960, 1);
IR_SEND(191984, 1);
IR_SEND(191984, 0);
IR_SEND(191992, 0);
IR_SEND(191992, 1);
IR_SEND(192008, 1);
IR_SEND(192008, 0);
IR_SEND(192016, 0);
IR_SEND(192016, 1);
IR_SEND(192036, 1);
IR_SEND(192036, 0);
IR_SEND(192044, 0);
IR_SEND(192044, 1);
IR_SEND(192060, 1);
IR_SEND(192060, 0);
IR_SEND(192068, 0);
IR_SEND(192068, 1);
IR_SEND(192092, 1);
IR_SEND(192092, 0);
IR_SEND(192096, 0);
IR_SEND(192096, 1);
IR_SEND(192116, 1);
IR_SEND(192116, 0);
IR_SEND(192120, 0);
IR_SEND(192120, 1);
IR_SEND(192144, 1);
IR_SEND(192144, 0);
IR_SEND(192148, 0);
IR_SEND(192148, 1);
IR_SEND(192168, 1);
IR_SEND(192168, 0);
IR_SEND(192172, 0);
IR_SEND(192172, 1);
IR_SEND(192196, 1);
IR_SEND(192196, 0);
IR_SEND(192200, 0);
IR_SEND(192200, 1);
IR_SEND(192220, 1);
IR_SEND(192220, 0);
IR_SEND(192228, 0);
IR_SEND(192228, 1);
IR_SEND(192248, 1);
IR_SEND(192248, 0);
IR_SEND(192256, 0);
IR_SEND(192256, 1);
IR_SEND(192272, 1);
IR_SEND(192272, 0);
IR_SEND(192280, 0);
IR_SEND(192280, 1);
IR_SEND(192300, 1);
IR_SEND(192300, 0);
IR_SEND(192308, 0);
IR_SEND(192308, 1);
IR_SEND(192324, 1);
IR_SEND(192324, 0);
IR_SEND(192332, 0);
IR_SEND(192332, 1);
IR_SEND(192356, 1);
IR_SEND(192356, 0);
IR_SEND(192360, 0);
IR_SEND(192360, 1);
IR_SEND(192380, 1);
IR_SEND(192380, 0);
IR_SEND(192384, 0);
IR_SEND(192384, 1);
IR_SEND(192408, 1);
IR_SEND(192408, 0);
IR_SEND(192412, 0);
IR_SEND(192412, 1);
IR_SEND(192432, 1);
IR_SEND(192432, 0);
IR_SEND(192436, 0);
IR_SEND(192436, 1);
IR_SEND(192460, 1);
IR_SEND(192460, 0);
IR_SEND(192468, 0);
IR_SEND(192468, 1);
IR_SEND(192484, 1);
IR_SEND(192484, 0);
IR_SEND(192492, 0);
IR_SEND(192492, 1);
//delay(5000);
}
//Lets try ctreate universal function for us
void IR_SEND(long time, int value){
if(value==1){
//Show high
digitalWrite(ledPin, HIGH);
}else{
//Show low
digitalWrite(ledPin, LOW);
}
delay(time/2500);
}