Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Need help with infrared sensor (http://www.chiefdelphi.com/forums/showthread.php?t=112623)

Team 2085 02-02-2013 16:36

Need help with infrared sensor
 
Hi, I'm using a 38kHz ir-LED and receiver module. However, I've had some trouble writing code for them. I think I figured out the receiver module and have wrote most of the code for it. I used a simple DigitalInput class and printed the value. It should be 1 if it doesn't receive anything and 0 if it does, right? :confused: The main problem I've had is making the LED output 38kHz. I'm trying to use a DigitalOutput class, so I wrote this:

DigitalOutput *irSender;
irSender = new DigitalOutput(2);

irSender->Set(true);

Can someone please tell me what I am doing wrong? :confused: I could really use any advice. Thanks

nuggetsyl 02-02-2013 20:42

Re: Need help with infrared sensor
 
Why are you using IR?

William Kunkel 03-02-2013 21:16

Re: Need help with infrared sensor
 
How is your LED wired? Do you have a picture/diagram?

Team 2085 04-02-2013 19:05

Re: Need help with infrared sensor
 
It is a zx-irm receiver and a zx-irLed light.



We can make the LED light up but don't know how to get it to flicker at 38 kHz.

Alan Anderson 04-02-2013 21:20

Re: Need help with infrared sensor
 
To get it to flicker at any frequency, provide it with that frequency on its input.

What are you trying to do with this sensor? There might be a better way to accomplish it.


All times are GMT -5. The time now is 12:55.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi