Go to Post This reminds me a lot of how millennials are regularly called out for simply being younger and having different perspectives. In the end it's the ones who are calling them out in unprofessional in ways that end up embarrassing themselves and looking uninformed. - Karthik [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 25-02-2008, 02:45
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
New Infrared Remote Control Software

If you're using my 2008 code and are in need of a new solution for IR remote control, I've created add on code that will do all the waveform processing on your robot controller. The only external component needed is a $2 Vishay IR sensor, which can be purchased at many distributors like Digikey, Newark, etc. As always, please post here if you find a bug in the code or documentation, or just find a fun use for the code outside of the 2008 game. Here's the link: http://kevin.org/frc/ifi_ir_sensor.zip.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #2   Spotlight this post!  
Unread 28-02-2008, 00:44
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,383
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: New Infrared Remote Control Software

This is an example of what Kevin's IR code can do. This code was originally written for Kevin's 2008 IFI alternative code. With a little reading and understanding of how it was written, I have munched it into my Vex code. If I can munch this into Vex code, you can easily munch it into the default IFI code. As you can see from the picture I am using a Sony DVD controller. If you look closely at the laptop screen, you can see that the address and command number are those for the number four key when using the Sony SIRC protocol.
The process of munching this code into Vex took me approximately one half hour. Therefore I'm assuming that the process of munching this code into the IFI default code would take approximately the same time. If you attempt to put this code into cabins 2008 code, it should only take you about 10 minutes. Please look at the picture below for a visual representation of how the code works. As you can see, it is a complete replacement for the IR board, and thus, is way more stable. Basically this becomes a single component replacement for the entire IR board. The component is a simple Vishay IR receiver, similar to those in the 2004 kit of parts.

__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
  #3   Spotlight this post!  
Unread 28-02-2008, 09:20
Joohoo's Avatar
Joohoo Joohoo is offline
Registered User
FRC #0340 (G.R.R.)
Team Role: Mentor
 
Join Date: Jun 2005
Rookie Year: 2005
Location: Rochester
Posts: 241
Joohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really niceJoohoo is just really nice
Send a message via AIM to Joohoo Send a message via Yahoo to Joohoo
Re: New Infrared Remote Control Software

Ok thank you for putting this out there.
Now a quick yet important question, I see that in your documentation you are refering to teleop.c and other files that are in the new code for the 3.0 compiler. I know where those locations translate to, but do you know or anyone know if this works with the code for the 2.4 compiler?
  #4   Spotlight this post!  
Unread 28-02-2008, 10:02
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,383
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by Joohoo View Post
I know where those locations translate to, but do you know or anyone know if this works with the code for the 2.4 compiler?
I believe I can answer this. The Vex uses the 2.4 compiler and MPLAB version 7.4, exactly the same as the code versions in the kit of parts.
To get this to work properly, you will also need to integrate Kevin's "encoder" code from his website. This will allow the IR sensor to be sampled properly. If you are already using encoders on your robot you may have done this.

The next thing you'll have to do is to slightly modify Kevin's instructions as to how to integrate the IR code. When his instructions tell you to modify the line in encoder.c where it calls the IR's interrupt channel ISR, you will have to do this in user_routines_fast.c. You will also have to comment out the call to "#include ifi_frc.c" and add in the "#include ifi.aliases.h" and "#include ifi_default.h".

I'm certain I have forgotten one or two minor points, but I think the most essential parts have been covered.

Kevin if you have any additional comments, please add them.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
  #5   Spotlight this post!  
Unread 28-02-2008, 10:35
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Re: New Infrared Remote Control Software

Can you post the VEX code? Does this new proposal eliminate "jamming" associated with two IR's being active at the same time?
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
  #6   Spotlight this post!  
Unread 28-02-2008, 10:48
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,383
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by marccenter View Post
Can you post the VEX code? Does this new proposal eliminate "jamming" associated with two IR's being active at the same time?
I can not post my code because it tightly integrates Kevin's ADC, ENCODER, GYRO and IR functions. I do not have permission to repost Kevin's work. If I strip out Kevin's files, the code would not make any sense. If Kevin releases me to post it, I will get it up as quickly as possible.

As for the elimination of jamming, no. Some form of shielding may help. The best thing you can do to prevent that is to work with your Alliance partners to come up with a strategy that will prevent it.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist

Last edited by billbo911 : 28-02-2008 at 10:50.
  #7   Spotlight this post!  
Unread 28-02-2008, 12:00
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by billbo911 View Post
I can not post my code because it tightly integrates Kevin's ADC, ENCODER, GYRO and IR functions. I do not have permission to repost Kevin's work. If I strip out Kevin's files, the code would not make any sense. If Kevin releases me to post it, I will get it up as quickly as possible.
Yes, I realize it may seem strange to give away software, but ask people to not make it available publicly on the 'net. My reasoning is that I want one public source of my code so that I don't end up burning up a lot of time helping teams fix bugs intoduced by third parties. It would also weaken my copyright if I allowed others to publicly post my code elsewhere. With that said, I have no problems with people occasionally e-mailing code to one another as long as it's done for educational purposes.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org

Last edited by Kevin Watson : 28-02-2008 at 12:03.
  #8   Spotlight this post!  
Unread 28-02-2008, 12:59
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,188
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: New Infrared Remote Control Software

Apparently I cannot access kevin.org as it is a "personal" site.

Can anyone tell me what this code is doing in terms of processor tax (interrupts, timers, heavy code)? It seems like something that I would like to integrate to take out the IR middle man, but we are already pushing the RC pretty far. (I chose readability and re-usability over a clean stack.. oh well)
  #9   Spotlight this post!  
Unread 28-02-2008, 13:08
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by Tom Bottiglieri View Post
Apparently I cannot access kevin.org as it is a "personal" site.

Can anyone tell me what this code is doing in terms of processor tax (interrupts, timers, heavy code)? It seems like something that I would like to integrate to take out the IR middle man, but we are already pushing the RC pretty far. (I chose readability and re-usability over a clean stack.. oh well)
The tax is pretty light. The ISR uses a timer to calculate the pulse width then uses a simple algorithm to build the 12-bit command word. Send me an e-mail and I'll reply with the code.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 05-03-2008, 00:59
chaoticprout's Avatar
chaoticprout chaoticprout is offline
can't wait for next years VRC
AKA: Michael Montazeri
FRC #1138 (Eagle Engineering)
Team Role: Alumni
 
Join Date: Nov 2004
Rookie Year: 2005
Location: West Hills, CA
Posts: 265
chaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant futurechaoticprout has a brilliant future
Send a message via AIM to chaoticprout Send a message via MSN to chaoticprout
Re: New Infrared Remote Control Software

Tested ir_sensor with the 3.0 code last weekend, worked perfectly. Thanks for the solution Kevin.
__________________
2009 Los Angeles Regional - Chairman's Award
2009 Granite State Regional - Engineering Inspiration Award
2007 Los Angeles Regional - Engineering Inspiration Award
2006 Southern California Regional - Regional Champions
  #11   Spotlight this post!  
Unread 05-03-2008, 18:12
SL8's Avatar
SL8 SL8 is offline
...
AKA: Jesus
FRC #0647 (Cyber Wolf Corps)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2008
Location: Killeen, Texas (Fort Hood)
Posts: 352
SL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud ofSL8 has much to be proud of
Send a message via Yahoo to SL8
Re: New Infrared Remote Control Software

Kevin,
Is there some way that we can implement your code for IR without using your code?

I only modified the default code in MPLab and the created the same effects in easyC.

If need be, I may end up using your code, but I was wondering if we would only have to implement Specific parts?
-Jesus
__________________


  #12   Spotlight this post!  
Unread 05-03-2008, 18:38
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,383
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by SL8 View Post
Kevin,
Is there some way that we can implement your code for IR without using your code?

I only modified the default code in MPLab and the created the same effects in easyC.

If need be, I may end up using your code, but I was wondering if we would only have to implement Specific parts?
-Jesus
Jesus,
If I understand your question, then yes, you can use Kevin's IR code without using Kevin's new C18 3.0 compatible IFI replacement code.
I was able to implement Kevin's IR code on my Vex robot which uses the same MPLAB 7.4 and C18 2.4 that came with the KOP this year.

If you would like, send me an IM with your e-mail address and I can send you a zip copy of my Vex code so you can see how I was able to do this. It will require that you use another piece of code from Kevin, namely, his Encoder code. It is also available on his web site.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
  #13   Spotlight this post!  
Unread 05-03-2008, 18:41
neoshaakti's Avatar
neoshaakti neoshaakti is offline
Registered User
FRC #2554 (WarHawks)
Team Role: College Student
 
Join Date: Jul 2007
Rookie Year: 2008
Location: Edison, NJ
Posts: 207
neoshaakti is a splendid one to beholdneoshaakti is a splendid one to beholdneoshaakti is a splendid one to beholdneoshaakti is a splendid one to beholdneoshaakti is a splendid one to beholdneoshaakti is a splendid one to beholdneoshaakti is a splendid one to behold
Send a message via AIM to neoshaakti
Re: New Infrared Remote Control Software

Quote:
Originally Posted by billbo911 View Post
This is an example of what Kevin's IR code can do. This code was originally written for Kevin's 2008 IFI alternative code. With a little reading and understanding of how it was written, I have munched it into my Vex code. If I can munch this into Vex code, you can easily munch it into the default IFI code. As you can see from the picture I am using a Sony DVD controller. If you look closely at the laptop screen, you can see that the address and command number are those for the number four key when using the Sony SIRC protocol.
The process of munching this code into Vex took me approximately one half hour. Therefore I'm assuming that the process of munching this code into the IFI default code would take approximately the same time. If you attempt to put this code into cabins 2008 code, it should only take you about 10 minutes. Please look at the picture below for a visual representation of how the code works. As you can see, it is a complete replacement for the IR board, and thus, is way more stable. Basically this becomes a single component replacement for the entire IR board. The component is a simple Vishay IR receiver, similar to those in the 2004 kit of parts.


correct me if I am wrong, but isnt that IR receiver the same kind that is locating in any computer mouse?
I know that if you are using a mouse with a ball in it, when the ball turns and moves it spins a shaft. On the end of the shaft there is a disk with usually 36 slits so that an IR beam can be picked up by an IR receiver to determine the movement of the mouse.
I have a rough understanding...
yea

-Neel
  #14   Spotlight this post!  
Unread 05-03-2008, 18:48
billbo911's Avatar
billbo911 billbo911 is offline
I prefer you give a perfect effort.
AKA: That's "Mr. Bill"
FRC #2073 (EagleForce)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Elk Grove, Ca.
Posts: 2,383
billbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond reputebillbo911 has a reputation beyond repute
Re: New Infrared Remote Control Software

Quote:
Originally Posted by neoshaakti View Post
correct me if I am wrong, but isnt that IR receiver the same kind that is locating in any computer mouse?
I know that if you are using a mouse with a ball in it, when the ball turns and moves it spins a shaft. On the end of the shaft there is a disk with usually 36 slits so that an IR beam can be picked up by an IR receiver to determine the movement of the mouse.
I have a rough understanding...
yea

-Neel
Good question!

Honestly Neel, I haven't looked closely enough at the inside of a mouse to answer that question. I think your concept is correct. As for the details, I can not say.
(This would be true for a "ball" mouse, not an "optical" mouse.)
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
  #15   Spotlight this post!  
Unread 05-03-2008, 19:18
gauntletguy gauntletguy is offline
Registered User
AKA: Eric Nelson
FRC #2771
Team Role: Leadership
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Grandville, MI
Posts: 6
gauntletguy is an unknown quantity at this point
Send a message via AIM to gauntletguy
Re: New Infrared Remote Control Software

would it be possible to wire multiple sensors together?
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
Remote Control Rover Help Dominator_Legen Math and Science 7 12-02-2005 03:35
Remote Control Car SUCCESS!! arpus maximus Control System 77 10-12-2004 20:30
Manual override of compressor software control willross Pneumatics 15 18-02-2004 23:51
Remote Remote Kickoff for Southern California ChrisH Southern California Regional Robotics Forum 0 05-01-2004 12:36
Remote Remote Kick off at University High School George1902 Off-Season Events 4 04-01-2004 21:05


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

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