Hi,
I have an IR remote that I've decoded using the example sketch in the IR library, but when I try to send the signals to send the IR code, nothing happens. I have tried to send different bit lengths through the for loop, and tried different protocols because I don't know which one works for my remote.
Hardware - Arduino mega 2560 R3, IR 950 nm LED with positive connecting to 100 ohm resistor and then pin 5 of PWM. Short lead to ground. Here is my code and a picture of the remote I have:
#include <IRremote.h>
// Define the IR LED pin
#define IR_LED_PIN 5
// Create an IRremote object
IRsend irSender;
void setup() {
// Initialize the IR LED pin as an output
pinMode(IR_LED_PIN, OUTPUT);
// Serial communication for debugging
Serial.begin(9600);
}
void loop() {
// Define the IR code to be emitted
unsigned long irCode = 0xE51AFF00;
for (int i = 1; i <= 256; i++) {
irSender.sendNEC(irCode, i);
delay(100);
irSender.sendSony(irCode, i);
delay(100);
irSender.sendRC5(irCode, i);
delay(100);
irSender.sendRC6(irCode, i);
delay(100);
irSender.sendFAST(irCode, i);
delay(100);
irSender.sendSharp(irCode, i);
delay(100);
}
}
When I decoded the IR signals this is what the decoded signal output was:
F906FF00
F20DFF00
E619FF00
E41BFF00
EE11FF00
E51AFF00
E01FFF00
F609FF00
E21DFF00
FA05FF00