View Single Post
  #2   Spotlight this post!  
Unread 11-01-2013, 23:30
Johnbot's Avatar
Johnbot Johnbot is offline
Es Brokein!
AKA: John Westhoff
FRC #4791 (Pandroids)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2010
Location: Horsham, PA
Posts: 92
Johnbot is just really niceJohnbot is just really niceJohnbot is just really niceJohnbot is just really niceJohnbot is just really nice
Re: SimpleRobot versus IterativeRobot

As Joe Ross said, the Robot Builder gives you a Command based model code. These commands are first defined in the Robot Builder. Scheduler.getInstance().run() just controls the top-level commands.

The command model might be a bit confusing to begin with, and you can always just put your teleop and auton code in their respective methods. You may also want a teleopInit method and a autonInit method, both of which are executed when switching from disabled to auton or teleop.

If you want to continue using the CommandBased Robot template, then the link Joe Ross is very helpful in getting started.

Also, you don't need to use the RobotBuilder to start. If you are using netbeans, you can rightclick the Projects area, click New Project, click FRC Java, and then choose the RobotTemplate that you want to use.

SimpleRobot requires you to do your loops yourself, so IterativeRobot may be the way to go.
If you see a SimpleRobot example, you can change it into an IterativeRobot by finding the operatorControl method, copying it to your teleopPeriodic method, and then removing the first line of that code that says something like "while (.....)"
__________________

2011-2014 - FRC 2607 - Student
2012-2012 - FLL 2249 - Coach
2015- ???? - FRC 4791 - Mentor
Reply With Quote