Interesting uses for pre-auton/initialize portion of code?

I wanted to start a thread that captures what people use the pre-autonomous (RobotC) or Initialize (easyC) portions of their code for. Asking out of curiosity, to learn, and to share with the community.

PLEASE PLEASE do not add to the list something that is already on the list, unless you have an interesting variation.

I’ll get the list started:

  • Auton code selection—either on an LCD screen, using jumper pegs, or via a potentiometer
  • Initialize gyro
  • Initialize other sensors? I can think of encoders, but not sure what other sensors apply here
  • On-the-field calibration of line trackers to measure real-world lighting conditions (thanks to @tabor473 Griffin Tabor for this one). Save on-field measurements of grey and white to global variables for use in auton.

Do you have an interesting application of the pre-auton/Initialize period? Please share!

Dunno if this counts, but LCD based position calibration. (My method of doing auton is making the field an x-y coordinate plane) so this would be measuring how far the robot is from the edges and iterating that in the LCD.

Any other stuff is kinda mundane, as it really only constitutes sensor calibration.

How does the LCD screen measure distance? I think I’m missing something. I’d love to hear more.

he uses other sensors, the LCD just makes it easier to see what your doing

Any insight on what other sensors you’re using, and what they do in the pre-auton period? I’m really trying to become more well-versed on this topic. :slight_smile:

last season I used 2 potentiometers to determine auton, because we weren’t sure how the LCD we bought worked. We also used ultrasonic and a gyro to help setup our robot. The 2 ultras would sound, and a speaker would beep telling us where to go, as well as a display on the LCD telling us how far off we were

Very cool. Thanks for the explanation!


So a couple years ago at the Skyrise World championship teams were doing a precise action on the field that relied on the relative position of 2 specific parts of the field. The world championship fields had been constructed inconsistently and a lot matches were pathetic because of it.

That I know of off the top of my head 2 teams had solutions to the problem.

Team BNS (Ended up 3rd or 4th)

Put the robot in the starting position, turned robot on and then during preauton rotated the robot to each position it needed to get to and hit a button to save the gyro values. You can see in the first 15 seconds the robot is rotated to line up. This meant the robot rotated a different amount each match.

Team AURA (Ended up 2nd with 3 red trophies)

Had a physical stop on their swinging arm (like many teams that year) but the physical stop was a screw and every match they would line up on the field and screw the screw to make sure the stop was perfect. Couldn’t find them doing it in a video but here is the reveal.