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:
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.