Go to Post I guess I'm a bit of an apple fanatic. - Austin [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-02-2013, 16:36
Team 2085 Team 2085 is offline
Registered User
FRC #2085
 
Join Date: Feb 2013
Location: Vacaville
Posts: 6
Team 2085 is an unknown quantity at this point
Question 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? 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? I could really use any advice. Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2013, 20:42
nuggetsyl's Avatar
nuggetsyl nuggetsyl is offline
Registered User
FRC #0025
Team Role: Coach
 
Join Date: Sep 2001
Location: north brunswick
Posts: 869
nuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond reputenuggetsyl has a reputation beyond repute
Re: Need help with infrared sensor

Why are you using IR?
__________________
00,12Championship winner
03,06,08 Championship finalist
02A,03C,06N,08C,11N,12G Division winner
00,03,06,07,08,10,12 NJ / MAR winner
11 VCU winner
06,10 Las Vegas winner
12 MAR Mt Olive
red is for team 348
Reply With Quote
  #3   Spotlight this post!  
Unread 03-02-2013, 21:16
William Kunkel William Kunkel is offline
Programming Lead
AKA: Kunkel
FRC #0422 (Mech Tech Dragons)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Richmond, VA
Posts: 94
William Kunkel is an unknown quantity at this point
Re: Need help with infrared sensor

How is your LED wired? Do you have a picture/diagram?
Reply With Quote
  #4   Spotlight this post!  
Unread 04-02-2013, 19:05
Team 2085 Team 2085 is offline
Registered User
FRC #2085
 
Join Date: Feb 2013
Location: Vacaville
Posts: 6
Team 2085 is an unknown quantity at this point
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.
Reply With Quote
  #5   Spotlight this post!  
Unread 04-02-2013, 21:20
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:54.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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