i have been trying to get this to work for a week now, but no luck
i am following this post here:
i have the IR led setup like this:
here is the photo:
https://drive.google.com/file/d/0B6zxKV5e65QTVkszWW5wbF9MOHc/preview?pli=1
i setup 2 arduino:
uno - with the IR receiver, when it reads, the green led will be on for a sec. and the led does turn on whenever i press any key on any remote. i was able to read a code too, and stored it in mega.
mega - with the IR transmitter, every 3 seconds, it will blink 2 times, then sends out the code... and i see it blinks, and i expect to see green on uno too, but nothing. this is the 2nd led i am trying, in case the 1st happen to be bad.
below is the code on mega, can someone help me please? i am out of troubleshooting ideas
#include <IRremote.h>
IRsend irsend;
int LED_PIN = 5;
void setup()
{
Serial.begin(9600);
pinMode(LED_PIN, OUTPUT);
}
void loop() {
int khz = 38; // 38kHz carrier frequency for the NEC protocol
// FF02FD
unsigned int irSignal[] = {8900, -4400, 600, -500, 600, -500, 600, -500, 550, -500, 600, -500, 600, -500, 600, -500, 600, -500, 600, -1600, 600, -1600, 600, -1600, 600, -1650, 550, -1650, 600, -1600, 600, -1600, 600, -1600, 600, -500, 600, -500, 600, -500, 600, -500, 600, -500, 550, -500, 600, -1650, 550, -500, 600, -1650, 550, -1650, 600, -1600, 600, -1600, 600, -1600, 600, -1650, 550, -500, 600, -1650, 550};
digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
digitalWrite(LED_PIN, HIGH);
delay(100);
digitalWrite(LED_PIN, LOW);
delay(100);
digitalWrite(LED_PIN, HIGH);
irsend.sendRaw(irSignal, sizeof(irSignal) / sizeof(irSignal[0]), khz);
digitalWrite(LED_PIN, LOW);
delay(3000); //In this example, the signal will be repeated every 5 seconds, approximately.
}