Quote:
Originally Posted by eagle33199
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.