Changes between Version 16 and Version 17 of ControlSystems/SoftwareTeam/Training/GettingStarted
- Timestamp:
- Sep 8, 2019, 10:17:17 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ControlSystems/SoftwareTeam/Training/GettingStarted
v16 v17 27 27 The 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]. 28 28 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 robotframework 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]. 30 30 31 31 * Connect your laptop to the RoboRIO USB port … … 38 38 **Congratulations**, you've just built and run your first robot program. 39 39 40 * Create another WPILib project based on the IterativeRobot framework40 * Create another WPILib project based on the TimedRobot framework 41 41 * Study an example program. This is a simple program for one of our test robots: Peanut 2. 42 42 * 2-wheel-drive (2WD) robot with two CIM motors driving plaction wheels … … 50 50 51 51 // Import the classes of objects you will use 52 import edu.wpi.first.wpilibj. IterativeRobot;52 import edu.wpi.first.wpilibj.TimedRobot; 53 53 import edu.wpi.first.wpilibj.XboxController; 54 54 import edu.wpi.first.wpilibj.GenericHID.Hand; … … 66 66 /** 67 67 * The VM is configured to automatically run this class, and to call the 68 * functions corresponding to each mode, as described in the IterativeRobot68 * functions corresponding to each mode, as described in the TimedRobot 69 69 * documentation. If you change the name of this class or the package after 70 70 * creating this project, you must also update the build.gradle file in the 71 71 * project. 72 72 */ 73 public class Robot extends IterativeRobot {73 public class Robot extends TimedRobot { 74 74 // Create instances of each object 75 75 private static final String kDefaultAuto = "Default";