Log in

View Full Version : What to do with the ir code?


Jared Stofflett
16-01-2004, 12:50
What needs to be done to get the ir code to work. As far as I can tell you need to modify the header files so that you have the macro's refferencing the proper inputs and outputs, but there has been a large discussion on trig to set your way. As far as I can tell the code will drive you to the proper place, is the trig just an effort to make this more efficient?

deltacoder1020
16-01-2004, 14:00
basically, yes. the ir code is designed so that it works somewhat out-of-the-box, with just the proper inputs selected and a little tuning of the values.

Raven_Writer
16-01-2004, 14:03
Not to sound stupid or anything, but what is the IR code for exactly?

deltacoder1020
16-01-2004, 14:33
it utilizes the IR sensors included in the kit to home in to a certain position near the bonus balls on the sidelines that trigger the ball release. essentially, it's an alternative method to find your way to a certain position on the field.

Raven_Writer
16-01-2004, 14:49
it utilizes the IR sensors included in the kit to home in to a certain position near the bonus balls on the sidelines that trigger the ball release. essentially, it's an alternative method to find your way to a certain position on the field.So, essentially, it's FIRST's type of seek-and-destroy?

Jared Stofflett
16-01-2004, 18:06
So, essentially, it's FIRST's type of seek-and-destroy?
Kind of Assuming the course from your robot to the platform was 45 degrees, if you followed the line you may go at 50 degrees part of the way and 40 degrees another part of the way. At least in theory the ir will let you go directly at 45 degrees, but I believe that there is some inacurisy programmed into the code. It also sounded like you would have to use ir instead of line tracking next year.

Raven_Writer
16-01-2004, 18:36
Kind of Assuming the course from your robot to the platform was 45 degrees, if you followed the line you may go at 50 degrees part of the way and 40 degrees another part of the way. At least in theory the ir will let you go directly at 45 degrees, but I believe that there is some inacurisy programmed into the code. It also sounded like you would have to use ir instead of line tracking next year.So, it'd be like, if robot + distance_to_platform_in_degrees = 45 && robot_direction = 50 then robot_direction = 45?

(sorry for the code-like part, but I'm just trying to understand it better)

Thanks by the way ;)

Jared Stofflett
16-01-2004, 22:02
Not exactly, sorry for being unclear. The line is curved, so you don't take the most direct path to the platform. You are always having to scan the line as well, and if you overshoot it, you will have a very hard time picking it back up. With ir two things can happen as i understand it, someone please let me know if i'm wrong. First your ir reciever can get oriented directly at the becon, as long as you narrow the range. This means rather then taking the line which is inderect you can take the most direct path, the shortest distence between two points is a straight line, the ir does a better job of picking that out then the line on the floor. Second because the ir becon puts out a wide signal if you get 10 or 20 degrees off corse you can easily get back on corse. With line tracking if you get 10 or 20 degrees off corse you are basicly screwed, unless you do a lot of fancy turning. In summary ir lets you plot the most direct corse to the platform, more direct then the line. Also if you get off corse you have a much better chance of finding your way back with ir then with the line.

Celestial Rain
16-01-2004, 22:06
hey umm i know this is the wrong thread. But i need someone to help us find some drive train links or webpages to help build the robot

also we were trying to get the education robot to start and it just sits there doing nothing. the PWN IN light is blinking red and thre radio control is red as well

deltacoder1020
17-01-2004, 01:06
celestial, you do know that you can start a new thread, right? and that there are other forums as well besides the programming one? I'd recommend asking your questions in the relevant forums.

Raven_Writer
17-01-2004, 10:43
One more question.

Are the sensors for going to the ball tee's and [hopefully] getting the balls?

(Sorry for the question, but I'm trying to figure this out).

deltacoder1020
17-01-2004, 10:53
for what the built-in code does, yes. you could reprogram them to take you to different parts of the field (using triangulation, et cetera), but the default code is for homing in on the area right next to the ball tees, allowing the removal of the 10pt ball and releasing the 5pt balls.

Raven_Writer
17-01-2004, 12:10
for what the built-in code does, yes. you could reprogram them to take you to different parts of the field (using triangulation, et cetera), but the default code is for homing in on the area right next to the ball tees, allowing the removal of the 10pt ball and releasing the 5pt balls.Thank you. I was sure that that's what it's purpose is, but I wasn't sure.