![]() |
I/R trouble!!!
I was wondering does the code that comes with the robot controler reguarding the I/R sensors work without any mods to the code? Because our robot controler will not alow us to download the orginal code........it gives us an error, its almost like the codes are fighting each other. Then when we mod the code and download it to the bot the sensors do not track the I/R becon we made. Im kinda stumped......any Ideas as to what might be wrong? Thanks
Dan B Team 940 |
Re: I/R trouble!!!
Quote:
The code that uses the IR sensors can be found at Kevin Watson's site http://kevin.org/frc/ You probably want navigate.zip. That's what was used at the FIRST Kickoff to demonstrate driving a robot using the IR system, and it can be used almost as is. (You will need to tweak parameters to get it to work with your drive system.) The code in the robot controller doesn't affect downloading new code. What kind of mod did you do to the code to get it to download? |
Re: I/R trouble!!!
Does the IR navigate.mcp have the everything in it to run the robot or just the programming to run the sensors, because there did not appear to be anything in the user_routine.c from the navigate.zip files. Do we need to have both the default codes and the navigate.mpc on the RC and if so how do we do that?
|
Re: I/R trouble!!!
Create a new directory extract navigate.zip. Open the navigate.mcw.
It's not recommended for novice users. There's quite a bit of tweaking to get it to work. From what I recall, Rich Petras' code turns the robot until a sensor can be seen then adjusts the sensors to start Kevin Watson's tracking code. It might be easier to start from just the tracking code. Also I would recommend looking how how they wired their receivers on the servos. Also, the receivers for the infra-red are interrupt based and the interrupts can be found in user_routines_fast.c I believe and Kevin calls functions outside in his own custom files that are new to the FRC code. Servo 1 |----------- | x |----------- |----------- | x |----------- Where x is the sensor. Thanks, Ryan Waliany |
Re: I/R trouble!!!
Quote:
Then call navigate() from User_Autonomous_Code() within the user_routines_fast.c file. |
Re: I/R trouble!!!
Quote:
Our tracking sensors are not picking up the infared signal from more than 4 inches away :confused: , do you have any suggestions to help fix this problem? -191 |
Re: I/R trouble!!!
Quote:
in detail. Are you testing the sensors in the optimal brightly lit, uncluttered room? Fully charged 7.2v battery? Another team had the same problem. We discussed it here http://www.chiefdelphi.com/forums/showthread.php?t=24396. See if any of those ideas help. |
Re: I/R trouble!!!
Quote:
Unfortuneatley, none of this helped :( our sensors our covered by heat shrink tubing and(well not fully....) were working really well (too well) for a while, i hope there not broke :ahh: .... and i looked over http://kevin.org/frc/faq.htm and didnt find anything to help much, any other ideas??? |
Re: I/R trouble!!!
They break really easy. During shipping, I almost guarantee you that at least one sensor will break. We made our mounts modulized so its like a connector which can be replaced easily.
I recommend doing a printf in each in receiver.c to check if every handler that has sensors attached is receiving a signal in the handler. This is how I tell if a sensor is broken or not. If the handler never gets called to print the debug statement and your sending infra-red signals to it, the sensor is broken. Thanks, Ryan Waliany |
Re: I/R trouble!!!
If they worked before, I have to wonder if you fried them with too much heat when you applied the heat-shrink tubing. That's the only thing I can think of.
-Kevin |
Re: I/R trouble!!!
I agree with rwaliany's suggestion to test each of your IR sensors.
In addition to the method suggested you can also test each sensor by using one of the regular digital inputs and printf'ing the value. With a working sensor you will see a stream of 1's & 0's when the beacon is on. [edit] (I got chased out of the building partway through answering your post last night - need a smiley with z's) Good practice is to test the components at each stage of construction. - Unadulterated IR sensor - After soldering wires to sensor - After mounting in tube - On servo - Full system Handle the sensors carefully. They are susceptible to static electricity, overheating from soldering/heat guns, incorrect wiring, being knocked around, etc. Only plug them in to a powered down controller and double check your connections on all leads from the sensor to the controller before urning it on. |
Re: I/R trouble!!!
HOW DOES THE AOUTONOMUS PROGRAM WORK WE CAN`T MAKE OURS WORK PLEASE HHHHHHHHHEEEEEEEEEEEELLLLLLLLPPPPPPPP SOMEONE ANY ONE????:ahh: :confused:
|
Re: I/R trouble!!!
Our team is having trouble with that as well....it was working, but it seems to be getting worse...glad to see other people are having the same troubles though :)
|
Re: I/R trouble!!!
Quote:
|
Re: I/R trouble!!!
Post the code that is causing problems. If we can look at it, we may be able to help. Also, tell us what it is supposed to do and what it seems to be doing instead.
Until then, here are my suggestions: ;) 1. Make sure you have a robot. 2. Make sure the robot has motors. 3. Make sure the RC is attched to the motors. 4. Make sure the wheels on the robot touch the ground. 5. Make sure you know assembler; it's so much better than C. (Bah! High level language. ;)) |
| All times are GMT -5. The time now is 03:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi