![]() |
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 |
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. ![]() |
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? |
Re: New Infrared Remote Control Software
Quote:
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. |
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? :confused:
|
Re: New Infrared Remote Control Software
Quote:
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. |
Re: New Infrared Remote Control Software
Quote:
-Kevin |
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) |
Re: New Infrared Remote Control Software
Quote:
-Kevin |
Re: New Infrared Remote Control Software
Tested ir_sensor with the 3.0 code last weekend, worked perfectly. Thanks for the solution Kevin.
|
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 |
Re: New Infrared Remote Control Software
Quote:
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. |
Re: New Infrared Remote Control Software
Quote:
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 |
Re: New Infrared Remote Control Software
Quote:
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.) |
Re: New Infrared Remote Control Software
would it be possible to wire multiple sensors together?
|
| All times are GMT -5. The time now is 06:19. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi