How to make a IR led blink at 38 Khz

Hello all,
I was looking around on forum about how to make a IR led blinking at 38 Khz and i could not find anywhere.
* What i want to do.
I want to build a IR reciver and transmiter working like a distance sensor swich.
ex. Put my hand over the IR reciver, (I don't know the model but i know that is working at 36khz - 38Khz)
and while the IR led blink at 38Khz and the reciver led read that info from my hand
the normal led or the pin 13 led light up(without blinking) and they High until i will get my hand off
the top of that 2 IR leds.

My problem now is that i builded that but the IR reciver 38Khz can't read the IR led.
* Using Code :
#include<IRremote.h>
#define pin_ir 8
#define pin_detect 6
#define pin_status 13

IRsend irsend;
void setup()
{
pinMode(pin_detect, INPUT);
pinMode(pin_status, OUTPUT);
pinMode(pin_ir, OUTPUT);
irsend.enableIROut(38); //I can put it at 36Khz and it will work normaly.
irsend.mark(0);
}
void loop()
{
digitalWrite(pin_status, !digitalRead(pin_detect));
}

Ps. I test the IR reciver with a TV remote control.

So my question again is:
How i put the IR led blink or stay High (Code) at 38Khz ? ? ?

Domino60

nd i could not find anywhere.

That's hard to believe. No, wait. Make that impossible. You are not the first one to want to do this.

Yes thats true, but all posts that i readed i could not find anywhere how to Light up a IR led at 38Khz

but all posts that i readed i could not find anywhere how to Light up a IR led at 38Khz

Including this one?
http://forum.arduino.cc/index.php/topic,102430.0.html

My project but dont work realy well as i wanted :smiley:

Domino60:
My problem now is that i builded that but the IR reciver 38Khz can't read the IR led.

It may be because your IR receiver is designed to switch of if it gets continuous modulated IR. (many are designed this way)

Either of these IR receivers from Vishay should work far better (for continuous IR @ 38kHz)... TSSP4038 or TSSP58038.

You should check the data sheet for the model of your existing IR receiver. Also verify the pin-out as they can all be different and most are HIGH when idle and LOW when receiving modulated IR.

Why are you dealing with this subject in two separate threads - there are several pages of info in the other thread which you are clearly already aware of. How to create a 38 Khz pulse with arduino using timer or PWM? - Programming Questions - Arduino Forum

It would be much more useful for everyone else to keep all the info together.

...R