Trouble Sending IR with Library

I'm using Ken Shirrif's IR library (http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html?commentPage=2) and while I'm able to receive IR just fine I can't for the life of me send an IR signal, and what I mean is that my IR LED is not emitting any light, and there is no voltage coming out of pin 3. I've troubleshooted all the obvious problems here's what I've done so far to test it out.

  • Tested the IR LED with a camera and simple code and it works (and it is in the right way)
  • Tested to see if PIN 3 works with other code, it does
  • Used another Arduino board just in case and it still doesn't work
  • Deleted and downloaded the library again
  • I've even just put in the code pinMode(3, OUTPUT) and digitalWrite(3, HIGH) on top of the basic send Code and it STILL doesn't emit anything.
  • I've typed in inputs into the Serial Monitor and even wrote a Serial.Write("working") code to see if it was working and it is.

So I don't understand what the issue is, I've seen pretty recent forums about his library and most people have trouble receiving, and seems like everyone can at least send out a signal with the basic example. Is there something in the code that shuts off pin 3 and doesn't turn it on? Any help will be appreciated and please note I'm new to coding

Thanks

  • Ozzie

Show us the code you're using and draw a picture of the circuit how you wired the LED to the Arduino.

Here is the code:

/*

  • IRremote: IRsendDemo - demonstrates sending IR codes with IRsend
  • An IR LED must be connected to Arduino PWM pin 3.
  • Version 0.1 July, 2009
  • Copyright 2009 Ken Shirriff
  • http://arcfn.com
    */

#include <IRremote.h>

IRsend irsend;

void setup()
{
Serial.begin(9600);
}

void loop() {
if (Serial.read() != -1) {
for (int i = 0; i < 3; i++) {
irsend.sendSony(0xa90, 12); // Sony TV power code
delay(100);
}
}
}

The circuit on the right is the one I’m using, It’s a copy of his circuit but mine is exactly the same, resistor and all

because you're sending it to pin D12, and not to pin D3..

@Steen: the 12 in sendSony() is the number of bits.

@OP: What kind of Arduino are you using? An UNO? A Mega? Do you use the original version of IRremote without changes?

How do you check for the Arduino to emit signals? A multimeter will not work. Have you checked with an oscilloscope? The output pin is up just for a few microseconds and then out for a very long time again.