Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   I/R trouble!!! (http://www.chiefdelphi.com/forums/showthread.php?t=24978)

Cadetdan 09-02-2004 15:00

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

Mark McLeod 09-02-2004 15:08

Re: I/R trouble!!!
 
Quote:

Originally Posted by Cadetdan
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

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?

rwaliany 09-02-2004 16:56

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

Mark McLeod 09-02-2004 16:59

Re: I/R trouble!!!
 
Quote:

Originally Posted by Fireboidsgrl
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

Re: I/R trouble!!!
 
Quote:

Originally Posted by Mark McLeod
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

Re: I/R trouble!!!
 
Quote:

Originally Posted by thirschfelt
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

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 http://www.chiefdelphi.com/forums/showthread.php?t=24396. See if any of those ideas help.

thirschfelt 13-02-2004 17:49

Re: I/R trouble!!!
 
Quote:

Originally Posted by Mark McLeod
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 http://www.chiefdelphi.com/forums/showthread.php?t=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

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

Kevin Watson 13-02-2004 20:50

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

Mark McLeod 13-02-2004 23:05

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.

team 1442 14-02-2004 14:50

Re: I/R trouble!!!
 
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

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 :)

deltacoder1020 15-02-2004 21:53

Re: I/R trouble!!!
 
Quote:

Originally Posted by team 1442
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.

Ryan M. 16-02-2004 06:54

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