Go to Post I say we just organize a top-secret raid into FIRST HQ one night. - Steven Donow [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2008, 20:23
program1's Avatar
program1 program1 is offline
Registered User
AKA: RJ
FRC #2441
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Maryknoll
Posts: 43
program1 will become famous soon enough
IR help

i have absoulutly no idea how to program the IR. can someone post a sample code so i know what it looks like please?
__________________
ok, who ate my hot pocket?
  #2   Spotlight this post!  
Unread 29-01-2008, 20:28
kevin.li.rit's Avatar
kevin.li.rit kevin.li.rit is offline
Imaginary Friend
AKA: Kevin Li
FRC #0596 (SciClones)
Team Role: Student
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Hopkinton, Massachusetts
Posts: 936
kevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond repute
Send a message via Yahoo to kevin.li.rit
Re: IR help

You plug the IR board into the Digital IO and program it just like you would a switch.

if(!rc_dig_in15)
{command1();
}

Something like that.
__________________
Kevin Li

596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers

Last edited by kevin.li.rit : 29-01-2008 at 20:37.
  #3   Spotlight this post!  
Unread 29-01-2008, 20:29
popo308's Avatar
popo308 popo308 is offline
Registered User
AKA: Brent
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Winnebago, IL
Posts: 312
popo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to all
Send a message via AIM to popo308
Re: IR help

Quote:
Originally Posted by program1 View Post
i have absoulutly no idea how to program the IR. can someone post a sample code so i know what it looks like please?
Are you using MPLab??
  #4   Spotlight this post!  
Unread 29-01-2008, 20:32
program1's Avatar
program1 program1 is offline
Registered User
AKA: RJ
FRC #2441
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Maryknoll
Posts: 43
program1 will become famous soon enough
Re: IR help

yea, im using MPLab
__________________
ok, who ate my hot pocket?
  #5   Spotlight this post!  
Unread 29-01-2008, 20:40
popo308's Avatar
popo308 popo308 is offline
Registered User
AKA: Brent
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Winnebago, IL
Posts: 312
popo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to all
Send a message via AIM to popo308
Re: IR help

Quote:
Originally Posted by program1 View Post
yea, im using MPLab
ok so if you just have


if (rc_dig_in01 == 1)
{
run mottors == XXX
}

then just

if(rc_dig_in02 == 1)
{
run motors == XXX
}

and repeat that for all 4 commands

you just need to tell it was motors to run when you hold the button down...



PM me if you need more help
  #6   Spotlight this post!  
Unread 29-01-2008, 20:43
kevin.li.rit's Avatar
kevin.li.rit kevin.li.rit is offline
Imaginary Friend
AKA: Kevin Li
FRC #0596 (SciClones)
Team Role: Student
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Hopkinton, Massachusetts
Posts: 936
kevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond repute
Send a message via Yahoo to kevin.li.rit
Re: IR help

I thought it gave you a 0 in programing when you sunk the pull ups of the digital IO to ground. Am I wrong?
__________________
Kevin Li

596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers
  #7   Spotlight this post!  
Unread 29-01-2008, 20:47
popo308's Avatar
popo308 popo308 is offline
Registered User
AKA: Brent
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Winnebago, IL
Posts: 312
popo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to all
Send a message via AIM to popo308
Re: IR help

Quote:
Originally Posted by Coffeeism View Post
I thought it gave you a 0 in programing when you sunk the pull ups of the digital IO to ground. Am I wrong?
thats what i thought as well but we hooked ours in and its giving us 1's....
  #8   Spotlight this post!  
Unread 29-01-2008, 20:48
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: IR help

Yeah the IR gives you 1's
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
  #9   Spotlight this post!  
Unread 29-01-2008, 20:48
kevin.li.rit's Avatar
kevin.li.rit kevin.li.rit is offline
Imaginary Friend
AKA: Kevin Li
FRC #0596 (SciClones)
Team Role: Student
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Hopkinton, Massachusetts
Posts: 936
kevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond repute
Send a message via Yahoo to kevin.li.rit
Re: IR help

I haven't hooked ours up yet. It could be possible the IR receiver board sinks it to 0 when there is no IR signal. Probably what's happening I guess.
__________________
Kevin Li

596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers
  #10   Spotlight this post!  
Unread 29-01-2008, 20:50
popo308's Avatar
popo308 popo308 is offline
Registered User
AKA: Brent
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Winnebago, IL
Posts: 312
popo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to all
Send a message via AIM to popo308
Re: IR help

Quote:
Originally Posted by Coffeeism View Post
I haven't hooked ours up yet. It could be possible the IR receiver board sinks it to 0 when there is no signal. Probably what's happening I guess.
also you are pulsing voltage into the RC where as connecting the pins is a ground to signal connection... that could be why
  #11   Spotlight this post!  
Unread 29-01-2008, 20:54
kevin.li.rit's Avatar
kevin.li.rit kevin.li.rit is offline
Imaginary Friend
AKA: Kevin Li
FRC #0596 (SciClones)
Team Role: Student
 
Join Date: Jan 2003
Rookie Year: 2001
Location: Hopkinton, Massachusetts
Posts: 936
kevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond reputekevin.li.rit has a reputation beyond repute
Send a message via Yahoo to kevin.li.rit
Re: IR help

Quote:
Originally Posted by popo308 View Post
also you are pulsing voltage into the RC where as connecting the pins is a ground to signal connection... that could be why
What I assume is happening is that the output pins on the PIC on the IR board, is set to 0 which would ground the signal on the RC and give a 0. When it sees the IR pulse it changes the output pin to 1 which is a high 5V. That would give you a 1 in programming.
__________________
Kevin Li

596 - Sciclones
1405 - Finney Falcons
2262 - Holliston Panthers
  #12   Spotlight this post!  
Unread 29-01-2008, 20:58
popo308's Avatar
popo308 popo308 is offline
Registered User
AKA: Brent
FRC #1625 (Winnovation)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Winnebago, IL
Posts: 312
popo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to allpopo308 is a name known to all
Send a message via AIM to popo308
Re: IR help

Quote:
Originally Posted by Coffeeism View Post
What I assume is happening is that the output pins on the PIC on the IR board, is set to 0 which would ground the signal on the RC and give a 0. When it sees the IR pulse it changes the output pin to 1 which is a high 5V. That would give you a 1 in programming.
yep exactly
  #13   Spotlight this post!  
Unread 29-01-2008, 21:59
RyanN's Avatar
RyanN RyanN is offline
RyanN
AKA: Ryan Nazaretian
FRC #4901 (Garnet Squadron)
Team Role: Mentor
 
Join Date: Jun 2006
Rookie Year: 2005
Location: Columbia, SC
Posts: 1,126
RyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond reputeRyanN has a reputation beyond repute
Re: IR help

Here is something I wrote in another thread. It's pretty much completely ready, and will work (as I found out today, because we didn't have power going our IR board and it came back as an error )

http://www.chiefdelphi.com/forums/sh...1&postcount=19
__________________
Garnet Squadron
FRC 4901
Controls Mentor
@rnazaretian

Previous mentor and student from Team Fusion, FRC 364
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Grab Frame - Help Help Help... nmihailidis Programming 2 04-03-2007 14:44
section 'InterruptVectorLow' type is non-overlay (was: HELP HELP HELP!!!!!) naor52 Programming 14 24-02-2007 01:19
Help: How do we get a teacher to help? (was: Help) ChaosAlchimey General Forum 13 21-01-2007 11:57


All times are GMT -5. The time now is 19:06.

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