How to send data using IR LED?

I plan to create a remote control for my RC car. I was trying to use IRemote Library, but nothing happened.
Here is my code for that:

#include <IRremote.h>

IRsend irsend;

void setup()

void loop() {
  if ( != -1) {
    for (int i = 0; i < 3; i++) {
      irsend.sendSony(0xa90, 12); 

I have connected a multimeter to anode and cathode of the LED, but voltage was 0. Is that normal? Why my receiver (TSOP 1736) does not get any data? How to make this work?

The multimeter may not be fast enough to read the bursts of pulses. Try observing the LED through a webcam. They are usually sensitive to IR.

If you have a high-power IR-LED, like the ones they sell at Radio Shack. it may require more current than the Arduino pin is capable of providing. You may need a transistor to boost the current capability. What are the specs of your IR-LED?

What is the for?

I don't know. I used example from library. I just wanted to check that diode is good.

I had shoot a photo of diode:

//EDIT: I can't find datasheet of diode, local electronics shop sold me it.

overkiller: I don't know. I used example from library. I just wanted to check that diode is good.

You have 14 non-blank lines of code and you don't know what one does? Better find out.

I can tell you one thing, the code won't do much without serial input. Are you sending serial data to it?

Is the LED connected to pin 12? Do you need to set pin 12 as an output in the setup?

@2xup I know what code does.I didn't knew for what is Serial.begin(9600);only I read about lib here:, but i didn't read last line under the code. :|

Ok, I'm typing now, characters to serial monitor, but nothing happens, e.g diode isn't emiting. (i'm looking trought camera in Samsung Galaxy Trend) @up Yes, it is. I thought that there is no need to set it to OUTPUT, because library is doing that.

And have you got the serial monitor open and are you sending the arduino some characters?

Yes, of course. It is sending because RX LED is blinking, when I press Enter with random character.

Ok try reversing the LED and see if that gives you some ir to view on you camera.

I switched two things: lib documentation say that I should connect LED to pin 3. So i did it now, but nothing happened. I switched back to 12, and nothing too and now cathode is connected to 12 pin and anode to GND.

Rather than diddle around trying to get the IR to send data, write a simple sketch to simply turn the LED on and off at regular intervals, just like the blink without delay example. If you still don't see IR being emitted, you have a hardware problem. There really aren't too many ways to connect an LED, so it shouldn't take long to solve the hardware problem.

An IR control project that might be of interest.