Thread: Autonomous Help
View Single Post
  #36   Spotlight this post!  
Unread 23-01-2015, 23:28
curtis0gj curtis0gj is offline
Registered User
FRC #5033 (Beavertronics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Canada
Posts: 121
curtis0gj will become famous soon enough
Re: Autonomous Help

Quote:
Originally Posted by mmaunu View Post
As for which template to use (Sample or Iterative), that is up to you. The SampleRobot template gets complicated quickly if you add any complexity to your code. If you like the loops, then you will need to use SampleRobot.

If the code above makes sense, though, I would encourage you to explore the IterativeRobot template. The teleop code works in a similar fashion: teleopInit() gets called once when teleop is enabled and teleopPeriodic() gets called every 20 ms for you (so avoid loops that don't exit quickly and do not use Timer.delay() to pause your code). Also, the 20 ms is just a great approximation...the loop timing is reallllly close to every 20 ms (certainly close enough for what we're doing).

If you do switch back to SampleRobot, then you will need the loops and the calls to Timer.delay().

Keep plugging away at it and keep asking questions. ChiefDelphi is full of people that want to help
Sweet maybe after the build season I will explore the Iterative robot but I would like to try and keep it basic this year seeing as I am new to this whole thing.
Reply With Quote