Created
July 1, 2012 06:58
-
-
Save jeje/3027236 to your computer and use it in GitHub Desktop.
Arduino Sketch recording raw IR signal and sending it through an infrared LED again every 2 seconds
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <IRremote.h> | |
int RECV_PIN = 11; | |
IRrecv irrecv(RECV_PIN); | |
IRsend irsend; | |
boolean recording = true; | |
decode_results results; | |
void setup() | |
{ | |
Serial.begin(9600); | |
irrecv.enableIRIn(); // Start the receiver | |
} | |
void loop() { | |
if (recording) { | |
if (irrecv.decode(&results)) { | |
Serial.println("IR code recorded!"); | |
//irrecv.resume(); // Receive the next value | |
Serial.print("Recorded "); | |
Serial.print(results.rawlen); | |
Serial.println(" intervals."); | |
recording = false; | |
} | |
} else { | |
// replay mode | |
Serial.println("Sending recorded IR signal!"); | |
irsend.sendRaw((unsigned int*) results.rawbuf, results.rawlen, 38); | |
delay(2000); | |
} | |
} |
It is recieving and sending but it don't switch my Panasonic tv.
send pin ??!!
send pin is pin3 un uno328
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hello everyone, iam doing a project i.e using ir remote codes to control the consumer products using arduino, ir receiver and ir led. i controlled the NEC protocol products but i didn't control the SAMSUNG protocol devices .i want control the LLOYD AC .it has SAMSUNG protocol .can you please help me.
thank you.