Rookie Team - Autonomous Mode Question

Help!, From reading the docs I see where the competition port pins 5-to-8 “allows” the autonomous_mode to be entered. From what I see, it “forces” the variable autonomous_mode.

From searching all the posts here, I can’t seem to find any post that confirms what I am seeing.

The actual question is, "Do I have to do anything, or do I just place code in the “user_autonomous” part of the user fast c file. THEN, during competition, the system will close pins 5 to 8 for the first 15 seconds?


If you want to test your autonomous, you just need place a wire in pin 8 and pin 5 (Pin 8 is a GND and Pin 5 is AUTONOMOUS MODE, active in nivel logic 0)

When you place the wire, automatically the routine of autonomous mode will start.

Good luck =)

In addition to what was already posted, during the competition you don’t need to do anything to put the robot into autonomous mode - they have a hook up for the competition port, and they’ll put your robot into autonomous mode, so any code you put in user_autonomous will execute until they switch it into the user operated mode.

It is highly recommended that every team builds a disable switch similar to

You can easily switch your robot from manual mode to auto mode. Then if you need to disable your robot without having to fumble with the power cord

Not only that but the emergency stop switch is great to have while testing autonomous.

We love our AM selector switch.

We incorporated disable and auto/teleop switches into our operator console last year. It’s very convenient not to have to worry about misplacing a standalone dongle. I’m sure this year’s console will have the same feature.

My team (2518) is a rookie team and we decided to use EasyC for the first year :rolleyes:

The way I understand what you’ve said is…

We just put our Autonomous code into the Autonomous(); function, and the OperatorControl into the OperatorControl(); function. And then before the competition the staff attaches a piece of hardware to the Competition port on the Operator Interface board, and they’ll call the proper function when it’s time to switch states ?

Same for the Initialize function I assume.

If you’re using one of the standard code bases out there (either the one from last year on ifi’s website or Kevin’s from the thread at the top of this forum or easy C), then yup. You just have to fill in your parts. The init functions in both of those bases are called once, then the other portion is called repeatedly every 26.2ms until the state switches. You don’t have to worry about the logic to switch between autonomous and user control.

The only thing you got wrong was “And then before the competition the staff attaches a piece of hardware to the Competition port on the Operator Interface board”… They have the cable there in every player station, but you’re the one that has to attach it to your OI!

Yes, it is very important to remember to plug in the competition port!

As stated earlier in this thread, it is recommended that you make a dongle (or buy the one from AndyMark) that contains an autonomous switch and a disable switch (sometimes, you just never know when the robot is going to go haywire when you load in some new code…). Pretty much everything you need can be bought at your beautiful, local RadioShack (or any other similar stores in your area). Either way, a disable button is a must.

However, if you do not have a dongle, you can temporarily do call your autonomous function for when a button on the joystick/control system is pushed. We did this to test auto mode when our dongle fell off the bus. If you do this, remember to remove it from your code before the competition. You don’t want your robot to start running autonomously should your driver accidentally hit the button on the joystick. I don’t recommend doing this unless you absolutely cannot get your hands on a dongle.