Log in

View Full Version : Automonous Competition


alexrobotics
16-02-2004, 14:19
Hello, We are wondering how auto. mode will be started at the regionals because people are using the code on kevin.org and to start all of that you need to push the trigger. So if I could get a little knowledge from you guys that would be great. We have a robot that can track IR. Now were are wondering about the beacon switch part of the robot? Is the beacon switch a hardware devise or is it something we define in the program like beacon type 0 or beacon type 1?
Thanks for your help.

Tom Bottiglieri
16-02-2004, 14:56
i havent looked at that code, but it seems it is calling the autonomous mode function with a trigger. On the operator interface, there is a pin in the competetion port that controls "autonomous mode" really what that means is in the default code, when the pin in question goes high, it calls the autonomous mode function. This can be located in user_routines_fast.c. This is how auto mode will be initiated at competitions. You could leave the trigger mapped to start it, but i wouldnt because it may be hit during a match and start up an unwanted auto mode

Mark McLeod
16-02-2004, 15:00
Hello, We are wondering how auto. mode will be started at the regionals because people are using the code on kevin.org and to start all of that you need to push the trigger. So if I could get a little knowledge from you guys that would be great. We have a robot that can track IR. Now were are wondering about the beacon switch part of the robot? Is the beacon switch a hardware devise or is it something we define in the program like beacon type 0 or beacon type 1?
Thanks for your help.Look in main.c and you will see a check on autonomous_mode. This is set by the arena controllers at competition, and is your signal to start your autonomous mode. You can imitate this startup yourself with a competition box. See IFI for directions on making one.

The navigate code must be modified to be called from your User_Autonomous_Code() and eliminated the push button start.
See some details here 25094

You need a standard on/off switch to tell your program which beacon to look for. It can be connected to digital input pin 7 signal and ground pins (don't use the +5v middle pin). rc_dig_in07 is then used by the tracker code to tell which beacon to look for.