Changes between Version 16 and Version 17 of ControlSystems/SoftwareTeam/Training/GettingStarted


Ignore:
Timestamp:
Sep 8, 2019, 10:17:17 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted

    v16 v17  
    2727The best way to learn about robot programming a robot is to start with a simple example program, run it, study what it does, and incrementally expand its functionality.  The WPILib software you installed includes example programs that you can compile and run on a RoboRIO.  Review [https://wpilib.screenstepslive.com/s/currentCS/m/79833/l/941601-vs-code-basics-and-wpilib-in-vs-code how to use VSCode] and then try [https://wpilib.screenstepslive.com/s/currentCS/m/79833/l/932465-creating-a-new-wpilib-project-in-vs-code creating a new robot project].
    2828
    29 * WPILib provides [https://wpilib.screenstepslive.com/s/currentCS/m/java/l/599697-choosing-a-base-class 3 frameworks] for building robot programs.  Build your first program using the iterative robot framework as described [https://wpilib.screenstepslive.com/s/currentCS/m/java/l/145307-creating-your-benchtop-test-program here].
     29* WPILib provides [https://wpilib.screenstepslive.com/s/currentCS/m/java/l/599697-choosing-a-base-class 3 frameworks] for building robot programs.  Build your first program using the TimedRobot (previously had been IterativeRobot) framework as described [https://wpilib.screenstepslive.com/s/currentCS/m/java/l/145307-creating-your-benchtop-test-program here].
    3030
    3131   * Connect your laptop to the RoboRIO USB port
     
    3838**Congratulations**, you've just built and run your first robot program.
    3939
    40 * Create another WPILib project based on the IterativeRobot framework
     40* Create another WPILib project based on the TimedRobot framework
    4141   * Study an example program.  This is a simple program for one of our test robots: Peanut 2. 
    4242      * 2-wheel-drive (2WD) robot with two CIM motors driving plaction wheels
     
    5050
    5151// Import the classes of objects you will use
    52 import edu.wpi.first.wpilibj.IterativeRobot;
     52import edu.wpi.first.wpilibj.TimedRobot;
    5353import edu.wpi.first.wpilibj.XboxController;
    5454import edu.wpi.first.wpilibj.GenericHID.Hand;
     
    6666/**
    6767 * The VM is configured to automatically run this class, and to call the
    68  * functions corresponding to each mode, as described in the IterativeRobot
     68 * functions corresponding to each mode, as described in the TimedRobot
    6969 * documentation. If you change the name of this class or the package after
    7070 * creating this project, you must also update the build.gradle file in the
    7171 * project.
    7272 */
    73 public class Robot extends IterativeRobot {
     73public class Robot extends TimedRobot {
    7474  // Create instances of each object
    7575  private static final String kDefaultAuto = "Default";