View Full Version : I/R trouble!!!
Cadetdan
09-02-2004, 15:00
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
Mark McLeod
09-02-2004, 15:08
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
The default code for the FRC doesn't do anything with the IR sensors.
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?
Meredith Rice
09-02-2004, 16:47
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?
rwaliany
09-02-2004, 16:56
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
Mark McLeod
09-02-2004, 16:59
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?
navigate is missing any user drive routine. It's probably easier to take Kevin's tracker.zip from his web site and add the navigate.c & navigate.h files to that.
Then call navigate() from User_Autonomous_Code() within the user_routines_fast.c file.
thirschfelt
12-02-2004, 17:23
navigate is missing any user drive routine. It's probably easier to take Kevin's tracker.zip from his web site and add the navigate.c & navigate.h files to that.
Then call navigate() from User_Autonomous_Code() within the user_routines_fast.c file.
hello,
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
Mark McLeod
13-02-2004, 10:04
hello,
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?
-191Well, my general advice is to read the FAQ at http://kevin.org/frc/faq.html
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 24396. See if any of those ideas help.
thirschfelt
13-02-2004, 17:49
Well, my general advice is to read the FAQ at http://kevin.org/frc/faq.html
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 24396. See if any of those ideas help.
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???
rwaliany
13-02-2004, 17:55
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
Kevin Watson
13-02-2004, 20:50
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
Mark McLeod
13-02-2004, 23:05
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.
team 1442
14-02-2004, 14:50
HOW DOES THE AOUTONOMUS PROGRAM WORK WE CAN`T MAKE OURS WORK PLEASE HHHHHHHHHEEEEEEEEEEEELLLLLLLLPPPPPPPP SOMEONE ANY ONE????:ahh: :confused:
Yellow Eyes
15-02-2004, 13:21
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 :)
deltacoder1020
15-02-2004, 21:53
HOW DOES THE AOUTONOMUS PROGRAM WORK WE CAN`T MAKE OURS WORK PLEASE HHHHHHHHHEEEEEEEEEEEELLLLLLLLPPPPPPPP SOMEONE ANY ONE????:ahh: :confused:
whew. calm down, take a deep breath. now, tell us what problems you're having. if I told you a program "wasn't working" and didn't say anything more, could you even begin to fix it? we need more information.
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. ;))
team 1442
16-02-2004, 16:37
whew. calm down, take a deep breath. now, tell us what problems you're having. if I told you a program "wasn't working" and didn't say anything more, could you even begin to fix it? we need more information.
OK the problem that we been having is that we can't make the autonomus period for the robot, we put one of the programs we made on users routine fast but it doesn't work please if you could tell us were to put or what do we need to make it work because the program does not work please help. :confused: :confused: :confused:
rwaliany
16-02-2004, 16:42
Post your code changes please.
Joe Ross
16-02-2004, 16:45
Did you make a competition dongle so that you are able to put it in autonomous mode? http://www.innovationfirst.com/FIRSTRobotics/pdfs/Competition_Port_Pinout_Guide.PDF
deltacoder1020
16-02-2004, 17:12
OK the problem that we been having is that we can't make the autonomus period for the robot, we put one of the programs we made on users routine fast but it doesn't work please if you could tell us were to put or what do we need to make it work because the program does not work please help. :confused: :confused: :confused:
have you tried adding a printf statement into the code to see if the program is even running? if you are putting the autonomous code into the User_Autonomous_Code() function (and you should be), it won't run unless you enabled autonomous mode on the competition port.
team 1442
16-02-2004, 19:00
have you tried adding a printf statement into the code to see if the program is even running? if you are putting the autonomous code into the User_Autonomous_Code() function (and you should be), it won't run unless you enabled autonomous mode on the competition port.
we do have a printf and it does read but the program for the sensors does not work we are rookies and it is the first time we use C so not much expirience :D :D so please can you guide us trow step by step how to enter the code please.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.