├── Project Code ├── Lesson 12 │ └── RobotComposition │ │ ├── src │ │ ├── Drivetrain.java │ │ ├── BallShooter.java │ │ ├── CubeElevator.java │ │ ├── GamePieceManipulator.java │ │ ├── HatchPanelPlacer.java │ │ ├── PowerUpRobot.java │ │ ├── DeepSpaceRobot.java │ │ ├── Robot.java │ │ ├── InfiniteRechargeRobot.java │ │ └── RobotComposition.java │ │ └── README.md ├── Lesson 2 │ └── Lesson2 │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── deploy │ │ │ └── example.txt │ │ │ └── java │ │ │ └── frc │ │ │ └── robot │ │ │ ├── Constants.java │ │ │ ├── commands │ │ │ ├── AutonomousDistance.java │ │ │ ├── AutonomousTime.java │ │ │ ├── DriveTime.java │ │ │ ├── DriveDistance.java │ │ │ ├── TurnTime.java │ │ │ └── ArcadeDrive.java │ │ │ └── Main.java │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 3 │ └── Lesson3 │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── deploy │ │ │ └── example.txt │ │ │ └── java │ │ │ └── frc │ │ │ └── robot │ │ │ ├── Constants.java │ │ │ ├── Main.java │ │ │ └── commands │ │ │ ├── AutonomousDistance.java │ │ │ ├── AutonomousTime.java │ │ │ ├── TurnLedOn.java │ │ │ ├── TurnLedOff.java │ │ │ ├── DriveTime.java │ │ │ ├── DriveDistance.java │ │ │ ├── TurnTime.java │ │ │ └── ArcadeDrive.java │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 10 │ └── Autonomous │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── deploy │ │ │ └── example.txt │ │ │ └── java │ │ │ └── frc │ │ │ └── robot │ │ │ ├── Constants.java │ │ │ ├── Main.java │ │ │ └── commands │ │ │ ├── AutonomousDistance.java │ │ │ ├── AutonomousTime.java │ │ │ ├── DriveTime.java │ │ │ ├── DriveDistance.java │ │ │ ├── TurnTime.java │ │ │ └── ArcadeDrive.java │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 5 │ └── CutPowerMode │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── deploy │ │ │ └── example.txt │ │ │ └── java │ │ │ └── frc │ │ │ └── robot │ │ │ ├── Constants.java │ │ │ ├── Main.java │ │ │ └── commands │ │ │ ├── AutonomousDistance.java │ │ │ ├── AutonomousTime.java │ │ │ ├── DriveTime.java │ │ │ ├── DriveDistance.java │ │ │ ├── TurnTime.java │ │ │ └── ArcadeDrive.java │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 6 │ └── GyroLights │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── deploy │ │ │ └── example.txt │ │ │ └── java │ │ │ └── frc │ │ │ └── robot │ │ │ ├── Constants.java │ │ │ ├── Main.java │ │ │ └── commands │ │ │ ├── AutonomousDistance.java │ │ │ ├── AutonomousTime.java │ │ │ ├── ToggleLightsBasedOnGyro.java │ │ │ ├── DriveTime.java │ │ │ ├── DriveDistance.java │ │ │ ├── TurnTime.java │ │ │ └── ArcadeDrive.java │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 7 │ └── GyroLights 2 │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── java │ │ │ └── frc │ │ │ │ └── robot │ │ │ │ ├── commands │ │ │ │ ├── Constants.java │ │ │ │ ├── AutonomousDistance.java │ │ │ │ ├── AutonomousTime.java │ │ │ │ ├── ToggleLightsBasedOnGyro.java │ │ │ │ ├── DriveTime.java │ │ │ │ ├── DriveDistance.java │ │ │ │ ├── TurnTime.java │ │ │ │ └── ArcadeDrive.java │ │ │ │ ├── Constants.java │ │ │ │ └── Main.java │ │ │ └── deploy │ │ │ └── example.txt │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 1 │ └── ExampleProject │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── deploy │ │ │ └── example.txt │ │ │ └── java │ │ │ └── frc │ │ │ └── robot │ │ │ ├── Constants.java │ │ │ ├── Main.java │ │ │ └── commands │ │ │ ├── AutonomousDistance.java │ │ │ ├── AutonomousTime.java │ │ │ ├── DriveTime.java │ │ │ ├── DriveDistance.java │ │ │ └── TurnTime.java │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 11 │ └── DriveStraight │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── deploy │ │ │ └── example.txt │ │ │ └── java │ │ │ └── frc │ │ │ └── robot │ │ │ ├── Main.java │ │ │ ├── Constants.java │ │ │ └── commands │ │ │ ├── AutonomousDistance.java │ │ │ ├── AutonomousTime.java │ │ │ ├── DriveTime.java │ │ │ ├── DriveDistance.java │ │ │ └── TurnTime.java │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 9 │ └── DriveStraight │ │ ├── .wpilib │ │ └── wpilib_preferences.json │ │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ │ ├── src │ │ └── main │ │ │ ├── deploy │ │ │ └── example.txt │ │ │ └── java │ │ │ └── frc │ │ │ └── robot │ │ │ ├── Main.java │ │ │ ├── Constants.java │ │ │ └── commands │ │ │ ├── AutonomousDistance.java │ │ │ ├── AutonomousTime.java │ │ │ ├── DriveTime.java │ │ │ ├── DriveDistance.java │ │ │ └── TurnTime.java │ │ ├── .vscode │ │ ├── settings.json │ │ └── launch.json │ │ ├── settings.gradle │ │ ├── vendordeps │ │ └── WPILibNewCommands.json │ │ ├── WPILib-License.md │ │ └── build.gradle ├── Lesson 14 │ └── SpriteGame │ │ ├── src │ │ ├── Fightable.java │ │ ├── Movable.java │ │ ├── NPC.java │ │ ├── Character.java │ │ ├── DestructibleObject.java │ │ ├── Enemy.java │ │ ├── Player.java │ │ └── SpriteGame.java │ │ └── README.md ├── Lesson 15 │ ├── SpriteGame │ │ ├── src │ │ │ ├── Fightable.java │ │ │ ├── Movable.java │ │ │ ├── NPC.java │ │ │ ├── Character.java │ │ │ ├── DestructibleObject.java │ │ │ ├── Enemy.java │ │ │ ├── Player.java │ │ │ └── SpriteGame.java │ │ └── README.md │ └── BasicOperations │ │ ├── README.md │ │ └── src │ │ └── App.java └── Lesson 4 │ └── MethodsScratch │ ├── README.md │ └── src │ └── App.java ├── General Troubleshooting.pdf └── Lessons ├── Romi Lesson 8 - Loops.pdf ├── Romi Lesson 13 - Arrays.pdf ├── Romi Lesson 9 - Gyro Project.pdf ├── Romi Lesson 1 - Getting Started.pdf ├── Romi Lesson 15 - Static & Super.pdf ├── Romi Lesson 4 - Methods Deep Dive.pdf ├── Romi Lesson 10 - Autonomous Commands.pdf ├── Romi Lesson 11 - Logical Operators.pdf ├── Romi Lesson 6 - OOP Deep Dive Part 1.pdf ├── Romi Lesson 7 - OOP Deep Dive Part 2.pdf ├── Romi Lesson 16 - Manual Drive Methods.pdf ├── Romi Lesson 19 - Parallel Command Groups.pdf ├── Romi Lesson 2 - Intro to Java - Variables.pdf ├── Romi Lesson 12 - Inheritance & Polymorphism.pdf ├── Romi Lesson 17 - Deadbanding & Turn Scaling.pdf ├── Romi Lesson 14 - Abstract Classes & Interfaces.pdf ├── Romi Lesson 18 - Exponential & Linear Control.pdf ├── Romi Lesson 3 - Methods, Classes, and Objects.pdf ├── Romi Lesson 5 - If Statements & Cut-Power Mode.pdf └── Romi Lesson 20 - Integrating Commands In Teleop.pdf /Project Code/Lesson 12/RobotComposition/src/Drivetrain.java: -------------------------------------------------------------------------------- 1 | public class Drivetrain { 2 | 3 | } 4 | -------------------------------------------------------------------------------- /General Troubleshooting.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/General Troubleshooting.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 8 - Loops.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 8 - Loops.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 13 - Arrays.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 13 - Arrays.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 9 - Gyro Project.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 9 - Gyro Project.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 1 - Getting Started.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 1 - Getting Started.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 15 - Static & Super.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 15 - Static & Super.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 4 - Methods Deep Dive.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 4 - Methods Deep Dive.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 10 - Autonomous Commands.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 10 - Autonomous Commands.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 11 - Logical Operators.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 11 - Logical Operators.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 6 - OOP Deep Dive Part 1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 6 - OOP Deep Dive Part 1.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 7 - OOP Deep Dive Part 2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 7 - OOP Deep Dive Part 2.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 16 - Manual Drive Methods.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 16 - Manual Drive Methods.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 19 - Parallel Command Groups.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 19 - Parallel Command Groups.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 2 - Intro to Java - Variables.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 2 - Intro to Java - Variables.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 12 - Inheritance & Polymorphism.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 12 - Inheritance & Polymorphism.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 17 - Deadbanding & Turn Scaling.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 17 - Deadbanding & Turn Scaling.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 14 - Abstract Classes & Interfaces.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 14 - Abstract Classes & Interfaces.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 18 - Exponential & Linear Control.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 18 - Exponential & Linear Control.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 3 - Methods, Classes, and Objects.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 3 - Methods, Classes, and Objects.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 5 - If Statements & Cut-Power Mode.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 5 - If Statements & Cut-Power Mode.pdf -------------------------------------------------------------------------------- /Lessons/Romi Lesson 20 - Integrating Commands In Teleop.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Lessons/Romi Lesson 20 - Integrating Commands In Teleop.pdf -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 2/Lesson2/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 3/Lesson3/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 10/Autonomous/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 5/CutPowerMode/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 6/GyroLights/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 7/GyroLights 2/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/.wpilib/wpilib_preferences.json: -------------------------------------------------------------------------------- 1 | { 2 | "enableCppIntellisense": false, 3 | "currentLanguage": "java", 4 | "projectYear": "2021", 5 | "teamNumber": 0 6 | } -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 1/ExampleProject/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 11/DriveStraight/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/czbeatty/FRC-Romi-Programming-Course/HEAD/Project Code/Lesson 9/DriveStraight/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/BallShooter.java: -------------------------------------------------------------------------------- 1 | public class BallShooter extends GamePieceManipulator { 2 | public void manipulate() { 3 | System.out.println("Shooting the balls!"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/CubeElevator.java: -------------------------------------------------------------------------------- 1 | public class CubeElevator extends GamePieceManipulator { 2 | public void manipulate() { 3 | System.out.println("Elevating the cube!"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/GamePieceManipulator.java: -------------------------------------------------------------------------------- 1 | public class GamePieceManipulator { 2 | public void manipulate() { 3 | System.out.println("Now manipulating the game piece."); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/HatchPanelPlacer.java: -------------------------------------------------------------------------------- 1 | public class HatchPanelPlacer extends GamePieceManipulator { 2 | public void manipulate() { 3 | System.out.println("Placing the hatch panel!"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/src/main/java/frc/robot/commands/Constants.java: -------------------------------------------------------------------------------- 1 | package frc.robot.commands; 2 | 3 | public class Constants { 4 | 5 | public static final double IS_ORIENTED_STRAIGHT_DEGREE_THRESHOLD = 5; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /Project Code/Lesson 14/SpriteGame/src/Fightable.java: -------------------------------------------------------------------------------- 1 | public interface Fightable { 2 | public void attack(); 3 | 4 | public void takeDamage(int damage); 5 | 6 | public int getMaxHp(); 7 | 8 | public int getHpRemaining(); 9 | } 10 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/SpriteGame/src/Fightable.java: -------------------------------------------------------------------------------- 1 | public interface Fightable { 2 | public void attack(); 3 | 4 | public void takeDamage(int damage); 5 | 6 | public int getMaxHp(); 7 | 8 | public int getHpRemaining(); 9 | } 10 | -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/PowerUpRobot.java: -------------------------------------------------------------------------------- 1 | public class PowerUpRobot extends Robot { 2 | 3 | public PowerUpRobot() { 4 | CubeElevator elevator = new CubeElevator(); 5 | this.manipulator = elevator; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/DeepSpaceRobot.java: -------------------------------------------------------------------------------- 1 | public class DeepSpaceRobot extends Robot { 2 | public DeepSpaceRobot() { 3 | HatchPanelPlacer placer = new HatchPanelPlacer(); 4 | this.manipulator = placer; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Project Code/Lesson 14/SpriteGame/src/Movable.java: -------------------------------------------------------------------------------- 1 | public interface Movable { 2 | public void moveNorth(); 3 | public void moveEast(); 4 | public void moveSouth(); 5 | public void moveWest(); 6 | public int getXPosition(); 7 | public int getYPosition(); 8 | } 9 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/SpriteGame/src/Movable.java: -------------------------------------------------------------------------------- 1 | public interface Movable { 2 | public void moveNorth(); 3 | public void moveEast(); 4 | public void moveSouth(); 5 | public void moveWest(); 6 | public int getXPosition(); 7 | public int getYPosition(); 8 | } 9 | -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/Robot.java: -------------------------------------------------------------------------------- 1 | public class Robot { 2 | protected Drivetrain drivetrain; 3 | protected GamePieceManipulator manipulator; 4 | 5 | public void manipulateGamePiece() { 6 | manipulator.manipulate(); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/InfiniteRechargeRobot.java: -------------------------------------------------------------------------------- 1 | public class InfiniteRechargeRobot extends Robot { 2 | 3 | public InfiniteRechargeRobot() { 4 | BallShooter ballShooter = new BallShooter(); 5 | this.manipulator = ballShooter; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/SpriteGame/src/NPC.java: -------------------------------------------------------------------------------- 1 | public class NPC extends Character { 2 | public NPC(String name) { 3 | super(name); 4 | } 5 | 6 | @Override 7 | public void introduce() { 8 | System.out.println("I sell things!"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/src/main/deploy/example.txt: -------------------------------------------------------------------------------- 1 | Files placed in this directory will be deployed to the RoboRIO into the 2 | 'deploy' directory in the home folder. Use the 'Filesystem.getDeployDirectory' wpilib function 3 | to get a proper path relative to the deploy directory. -------------------------------------------------------------------------------- /Project Code/Lesson 14/SpriteGame/src/NPC.java: -------------------------------------------------------------------------------- 1 | public class NPC extends Character { 2 | public NPC(String name) { 3 | this.setName(name); 4 | } 5 | 6 | @Override 7 | public void introduce() { 8 | System.out.println("I sell things!"); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=permwrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=permwrapper/dists 6 | -------------------------------------------------------------------------------- /Project Code/Lesson 14/SpriteGame/src/Character.java: -------------------------------------------------------------------------------- 1 | public abstract class Character { 2 | private String name; 3 | 4 | public void printName() { 5 | System.out.println(this.name); 6 | } 7 | 8 | public void setName(String name) { 9 | this.name = name; 10 | } 11 | 12 | public abstract void introduce(); 13 | } 14 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/SpriteGame/src/Character.java: -------------------------------------------------------------------------------- 1 | public abstract class Character { 2 | private String name; 3 | 4 | public Character(String name) { 5 | this.setName(name); 6 | } 7 | 8 | public void printName() { 9 | System.out.println(this.name); 10 | } 11 | 12 | public void setName(String name) { 13 | this.name = name; 14 | } 15 | 16 | public abstract void introduce(); 17 | } 18 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "java.configuration.updateBuildConfiguration": "automatic", 3 | "java.server.launchMode": "Standard", 4 | "files.exclude": { 5 | "**/.git": true, 6 | "**/.svn": true, 7 | "**/.hg": true, 8 | "**/CVS": true, 9 | "**/.DS_Store": true, 10 | "bin/": true, 11 | "**/.classpath": true, 12 | "**/.project": true, 13 | "**/.settings": true, 14 | "**/.factorypath": true, 15 | "**/*~": true 16 | }, 17 | "wpilib.skipSelectSimulateExtension": true 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 14/SpriteGame/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. 4 | 5 | ## Folder Structure 6 | 7 | The workspace contains two folders by default, where: 8 | 9 | - `src`: the folder to maintain sources 10 | - `lib`: the folder to maintain dependencies 11 | 12 | ## Dependency Management 13 | 14 | The `JAVA DEPENDENCIES` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-pack/blob/master/release-notes/v0.9.0.md#work-with-jar-files-directly). 15 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/SpriteGame/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. 4 | 5 | ## Folder Structure 6 | 7 | The workspace contains two folders by default, where: 8 | 9 | - `src`: the folder to maintain sources 10 | - `lib`: the folder to maintain dependencies 11 | 12 | ## Dependency Management 13 | 14 | The `JAVA DEPENDENCIES` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-pack/blob/master/release-notes/v0.9.0.md#work-with-jar-files-directly). 15 | -------------------------------------------------------------------------------- /Project Code/Lesson 4/MethodsScratch/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. 4 | 5 | ## Folder Structure 6 | 7 | The workspace contains two folders by default, where: 8 | 9 | - `src`: the folder to maintain sources 10 | - `lib`: the folder to maintain dependencies 11 | 12 | ## Dependency Management 13 | 14 | The `JAVA DEPENDENCIES` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-pack/blob/master/release-notes/v0.9.0.md#work-with-jar-files-directly). 15 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "wpilib", 10 | "name": "WPILib Desktop Debug", 11 | "request": "launch", 12 | "desktop": true, 13 | }, 14 | { 15 | "type": "wpilib", 16 | "name": "WPILib roboRIO Debug", 17 | "request": "launch", 18 | "desktop": false, 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. 4 | 5 | ## Folder Structure 6 | 7 | The workspace contains two folders by default, where: 8 | 9 | - `src`: the folder to maintain sources 10 | - `lib`: the folder to maintain dependencies 11 | 12 | ## Dependency Management 13 | 14 | The `JAVA DEPENDENCIES` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-pack/blob/master/release-notes/v0.9.0.md#work-with-jar-files-directly). 15 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/BasicOperations/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. 4 | 5 | ## Folder Structure 6 | 7 | The workspace contains two folders by default, where: 8 | 9 | - `src`: the folder to maintain sources 10 | - `lib`: the folder to maintain dependencies 11 | 12 | ## Dependency Management 13 | 14 | The `JAVA DEPENDENCIES` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-pack/blob/master/release-notes/v0.9.0.md#work-with-jar-files-directly). 15 | -------------------------------------------------------------------------------- /Project Code/Lesson 14/SpriteGame/src/DestructibleObject.java: -------------------------------------------------------------------------------- 1 | public class DestructibleObject implements Fightable { 2 | 3 | @Override 4 | public void attack() { 5 | System.out.println("Object destroyed!"); 6 | } 7 | 8 | @Override 9 | public void takeDamage(int damage) { 10 | // TODO Auto-generated method stub 11 | 12 | } 13 | 14 | @Override 15 | public int getMaxHp() { 16 | // TODO Auto-generated method stub 17 | return 0; 18 | } 19 | 20 | @Override 21 | public int getHpRemaining() { 22 | // TODO Auto-generated method stub 23 | return 0; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/SpriteGame/src/DestructibleObject.java: -------------------------------------------------------------------------------- 1 | public class DestructibleObject implements Fightable { 2 | 3 | @Override 4 | public void attack() { 5 | System.out.println("Object destroyed!"); 6 | } 7 | 8 | @Override 9 | public void takeDamage(int damage) { 10 | // TODO Auto-generated method stub 11 | 12 | } 13 | 14 | @Override 15 | public int getMaxHp() { 16 | // TODO Auto-generated method stub 17 | return 0; 18 | } 19 | 20 | @Override 21 | public int getHpRemaining() { 22 | // TODO Auto-generated method stub 23 | return 0; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Project Code/Lesson 12/RobotComposition/src/RobotComposition.java: -------------------------------------------------------------------------------- 1 | public class RobotComposition { 2 | public static void main(String[] args) throws Exception { 3 | Robot robot = new Robot(); 4 | GamePieceManipulator manipulator = new GamePieceManipulator(); 5 | robot.manipulator = manipulator; 6 | 7 | PowerUpRobot powerUpRobot = new PowerUpRobot(); 8 | DeepSpaceRobot deepSpaceRobot = new DeepSpaceRobot(); 9 | InfiniteRechargeRobot infiniteRechargeRobot = new InfiniteRechargeRobot(); 10 | 11 | robot.manipulateGamePiece(); 12 | powerUpRobot.manipulateGamePiece(); 13 | deepSpaceRobot.manipulateGamePiece(); 14 | infiniteRechargeRobot.manipulateGamePiece(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants {} 16 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants {} 16 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants {} 16 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants {} 16 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants {} 16 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants {} 16 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants {} 16 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/SpriteGame/src/Enemy.java: -------------------------------------------------------------------------------- 1 | public class Enemy extends Character implements Fightable { 2 | public Enemy(String name) { 3 | super(name); 4 | } 5 | 6 | @Override 7 | public void attack() { 8 | System.out.println("Enemy now attacking."); 9 | } 10 | 11 | @Override 12 | public void takeDamage(int damage) { 13 | // TODO Auto-generated method stub 14 | } 15 | 16 | @Override 17 | public int getMaxHp() { 18 | // TODO Auto-generated method stub 19 | return 0; 20 | } 21 | 22 | @Override 23 | public int getHpRemaining() { 24 | // TODO Auto-generated method stub 25 | return 0; 26 | } 27 | 28 | @Override 29 | public void introduce() { 30 | System.out.println("I am an evil enemy!"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Project Code/Lesson 14/SpriteGame/src/Enemy.java: -------------------------------------------------------------------------------- 1 | public class Enemy extends Character implements Fightable { 2 | public Enemy(String name) { 3 | this.setName(name); 4 | } 5 | 6 | @Override 7 | public void attack() { 8 | System.out.println("Enemy now attacking."); 9 | } 10 | 11 | @Override 12 | public void takeDamage(int damage) { 13 | // TODO Auto-generated method stub 14 | } 15 | 16 | @Override 17 | public int getMaxHp() { 18 | // TODO Auto-generated method stub 19 | return 0; 20 | } 21 | 22 | @Override 23 | public int getHpRemaining() { 24 | // TODO Auto-generated method stub 25 | return 0; 26 | } 27 | 28 | @Override 29 | public void introduce() { 30 | System.out.println("I am an evil enemy!"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type. 21 | */ 22 | public static void main(String... args) { 23 | RobotBase.startRobot(Robot::new); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type. 21 | */ 22 | public static void main(String... args) { 23 | RobotBase.startRobot(Robot::new); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type. 21 | */ 22 | public static void main(String... args) { 23 | RobotBase.startRobot(Robot::new); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type. 21 | */ 22 | public static void main(String... args) { 23 | RobotBase.startRobot(Robot::new); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type. 21 | */ 22 | public static void main(String... args) { 23 | RobotBase.startRobot(Robot::new); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type. 21 | */ 22 | public static void main(String... args) { 23 | RobotBase.startRobot(Robot::new); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type. 21 | */ 22 | public static void main(String... args) { 23 | RobotBase.startRobot(Robot::new); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type. 21 | */ 22 | public static void main(String... args) { 23 | RobotBase.startRobot(Robot::new); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants { 16 | public static final double GYRO_ADJUST_SCALE_COEFFICIENT = .01; 17 | public static final double Z_AXIS_ROTATE_DEADBAND_VALUE = .1; 18 | } 19 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/settings.gradle: -------------------------------------------------------------------------------- 1 | import org.gradle.internal.os.OperatingSystem 2 | 3 | pluginManagement { 4 | repositories { 5 | mavenLocal() 6 | gradlePluginPortal() 7 | String frcYear = '2021' 8 | File frcHome 9 | if (OperatingSystem.current().isWindows()) { 10 | String publicFolder = System.getenv('PUBLIC') 11 | if (publicFolder == null) { 12 | publicFolder = "C:\\Users\\Public" 13 | } 14 | def homeRoot = new File(publicFolder, "wpilib") 15 | frcHome = new File(homeRoot, frcYear) 16 | } else { 17 | def userFolder = System.getProperty("user.home") 18 | def homeRoot = new File(userFolder, "wpilib") 19 | frcHome = new File(homeRoot, frcYear) 20 | } 21 | def frcHomeMaven = new File(frcHome, 'maven') 22 | maven { 23 | name 'frcHome' 24 | url frcHomeMaven 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/src/main/java/frc/robot/Constants.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | /** 8 | * The Constants class provides a convenient place for teams to hold robot-wide numerical or boolean 9 | * constants. This class should not be used for any other purpose. All constants should be declared 10 | * globally (i.e. public static). Do not put anything functional in this class. 11 | * 12 | *
It is advised to statically import this class (or one of its inner classes) wherever the 13 | * constants are needed, to reduce verbosity. 14 | */ 15 | public final class Constants { 16 | public static final double GYRO_ADJUST_SCALE_COEFFICIENT = .01; 17 | public static final double Z_AXIS_ROTATE_DEADBAND_VALUE = .1; 18 | public static final double TURN_TIMER_TURNING_GRACE_PERIOD = .5; 19 | } 20 | -------------------------------------------------------------------------------- /Project Code/Lesson 15/BasicOperations/src/App.java: -------------------------------------------------------------------------------- 1 | public class App { 2 | public static void main(String[] args) throws Exception { 3 | System.out.println(add(5, 10)); 4 | System.out.println(subtract(5, 10)); 5 | System.out.println(multiply(5, 10)); 6 | System.out.println(divide(5, 10)); 7 | 8 | System.out.println(Math.cos(.5)); 9 | System.out.println(Math.sin(.5)); 10 | System.out.println(Math.PI); 11 | System.out.println(Math.random()); 12 | } 13 | 14 | public static int add(int firstNumber, int secondNumber) { 15 | return firstNumber + secondNumber; 16 | } 17 | 18 | public static int subtract(int firstNumber, int secondNumber) { 19 | return firstNumber - secondNumber; 20 | } 21 | 22 | public static int multiply(int firstNumber, int secondNumber) { 23 | return firstNumber * secondNumber; 24 | } 25 | 26 | public static double divide(double firstNumber, double secondNumber) { 27 | return firstNumber / secondNumber; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/src/main/java/frc/robot/commands/AutonomousDistance.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousDistance extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on distance. This will drive out for a specified distance, 13 | * turn around and drive back. 14 | * 15 | * @param drivetrain The drivetrain subsystem on which this command will run 16 | */ 17 | public AutonomousDistance(Drivetrain drivetrain) { 18 | addCommands( 19 | new DriveDistance(-0.5, 10, drivetrain), 20 | new TurnDegrees(-0.5, 180, drivetrain), 21 | new DriveDistance(-0.5, 10, drivetrain), 22 | new TurnDegrees(0.5, 180, drivetrain)); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/src/main/java/frc/robot/commands/AutonomousTime.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import frc.robot.subsystems.Drivetrain; 8 | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; 9 | 10 | public class AutonomousTime extends SequentialCommandGroup { 11 | /** 12 | * Creates a new Autonomous Drive based on time. This will drive out for a period of time, turn 13 | * around for time (equivalent to time to turn around) and drive forward again. This should mimic 14 | * driving out, turning around and driving back. 15 | * 16 | * @param drivetrain The drive subsystem on which this command will run 17 | */ 18 | public AutonomousTime(Drivetrain drivetrain) { 19 | addCommands( 20 | new DriveTime(-0.6, 2.0, drivetrain), 21 | new TurnTime(-0.5, 1.3, drivetrain), 22 | new DriveTime(-0.6, 2.0, drivetrain), 23 | new TurnTime(0.5, 1.3, drivetrain)); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 10/Autonomous/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 5/CutPowerMode/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 6/GyroLights/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 7/GyroLights 2/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 1/ExampleProject/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 11/DriveStraight/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 9/DriveStraight/vendordeps/WPILibNewCommands.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileName": "WPILibNewCommands.json", 3 | "name": "WPILib-New-Commands", 4 | "version": "2020.0.0", 5 | "uuid": "111e20f7-815e-48f8-9dd6-e675ce75b266", 6 | "mavenUrls": [], 7 | "jsonUrl": "", 8 | "javaDependencies": [ 9 | { 10 | "groupId": "edu.wpi.first.wpilibNewCommands", 11 | "artifactId": "wpilibNewCommands-java", 12 | "version": "wpilib" 13 | } 14 | ], 15 | "jniDependencies": [], 16 | "cppDependencies": [ 17 | { 18 | "groupId": "edu.wpi.first.wpilibNewCommands", 19 | "artifactId": "wpilibNewCommands-cpp", 20 | "version": "wpilib", 21 | "libName": "wpilibNewCommands", 22 | "headerClassifier": "headers", 23 | "sourcesClassifier": "sources", 24 | "sharedLibrary": true, 25 | "skipInvalidPlatforms": true, 26 | "binaryPlatforms": [ 27 | "linuxathena", 28 | "linuxraspbian", 29 | "linuxaarch64bionic", 30 | "windowsx86-64", 31 | "windowsx86", 32 | "linuxx86-64", 33 | "osxx86-64" 34 | ] 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/src/main/java/frc/robot/commands/TurnLedOn.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import edu.wpi.first.wpilibj2.command.CommandBase; 8 | import frc.robot.subsystems.OnBoardIO; 9 | 10 | public class TurnLedOn extends CommandBase { 11 | private final OnBoardIO m_io; 12 | 13 | /** Creates a new TurnLedOn. */ 14 | public TurnLedOn(OnBoardIO io) { 15 | // Use addRequirements() here to declare subsystem dependencies. 16 | m_io = io; 17 | addRequirements(io); 18 | } 19 | 20 | // Called when the command is initially scheduled. 21 | @Override 22 | public void initialize() {} 23 | 24 | // Called every time the scheduler runs while the command is scheduled. 25 | @Override 26 | public void execute() { 27 | m_io.setGreenLed(true); 28 | } 29 | 30 | // Called once the command ends or is interrupted. 31 | @Override 32 | public void end(boolean interrupted) {} 33 | 34 | // Returns true when the command should end. 35 | @Override 36 | public boolean isFinished() { 37 | return false; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Project Code/Lesson 3/Lesson3/src/main/java/frc/robot/commands/TurnLedOff.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot.commands; 6 | 7 | import edu.wpi.first.wpilibj2.command.CommandBase; 8 | import frc.robot.subsystems.OnBoardIO; 9 | 10 | public class TurnLedOff extends CommandBase { 11 | private final OnBoardIO m_io; 12 | 13 | /** Creates a new TurnLedOff. */ 14 | public TurnLedOff(OnBoardIO io) { 15 | // Use addRequirements() here to declare subsystem dependencies. 16 | m_io = io; 17 | addRequirements(io); 18 | } 19 | // Called when the command is initially scheduled. 20 | @Override 21 | public void initialize() {} 22 | 23 | // Called every time the scheduler runs while the command is scheduled. 24 | @Override 25 | public void execute() { 26 | m_io.setGreenLed(false); 27 | } 28 | 29 | // Called once the command ends or is interrupted. 30 | @Override 31 | public void end(boolean interrupted) {} 32 | 33 | // Returns true when the command should end. 34 | @Override 35 | public boolean isFinished() { 36 | return false; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Project Code/Lesson 2/Lesson2/src/main/java/frc/robot/Main.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) FIRST and other WPILib contributors. 2 | // Open Source Software; you can modify and/or share it under the terms of 3 | // the WPILib BSD license file in the root directory of this project. 4 | 5 | package frc.robot; 6 | 7 | import edu.wpi.first.wpilibj.RobotBase; 8 | 9 | /** 10 | * Do NOT add any static variables to this class, or any initialization at all. Unless you know what 11 | * you are doing, do not modify this file except to change the parameter class to the startRobot 12 | * call. 13 | */ 14 | public final class Main { 15 | private Main() {} 16 | 17 | /** 18 | * Main initialization function. Do not perform any initialization here. 19 | * 20 | *
If you change your main robot class, change the parameter type.
21 | */
22 | public static void main(String... args) {
23 | int numberOfWheelsOnRobot = 2;
24 | double robotSpeedInchesPerSecond = 3.1;
25 |
26 | System.out.print("Number of wheels on the robot: ");
27 | System.out.println(numberOfWheelsOnRobot);
28 |
29 | System.out.print("The robot's current speed: ");
30 | System.out.println(robotSpeedInchesPerSecond);
31 |
32 | // The robot has stopped! Update the speed to 0 inches per second.
33 | robotSpeedInchesPerSecond = 0;
34 |
35 | System.out.print("The robot stopped! Now its new speed is: ");
36 | System.out.println(robotSpeedInchesPerSecond);
37 |
38 | RobotBase.startRobot(Robot::new);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Project Code/Lesson 15/SpriteGame/src/Player.java:
--------------------------------------------------------------------------------
1 | public class Player extends Character implements Fightable, Movable {
2 | public Player(String name) {
3 | super(name);
4 | }
5 |
6 | @Override
7 | public void attack() {
8 | System.out.println("Player now attacking.");
9 | }
10 |
11 | @Override
12 | public void takeDamage(int damage) {
13 | // TODO Auto-generated method stub
14 | }
15 |
16 | @Override
17 | public int getMaxHp() {
18 | // TODO Auto-generated method stub
19 | return 0;
20 | }
21 |
22 | @Override
23 | public int getHpRemaining() {
24 | // TODO Auto-generated method stub
25 | return 0;
26 | }
27 |
28 | @Override
29 | public void moveNorth() {
30 | // TODO Auto-generated method stub
31 |
32 | }
33 |
34 | @Override
35 | public void moveEast() {
36 | // TODO Auto-generated method stub
37 |
38 | }
39 |
40 | @Override
41 | public void moveSouth() {
42 | // TODO Auto-generated method stub
43 |
44 | }
45 |
46 | @Override
47 | public void moveWest() {
48 | // TODO Auto-generated method stub
49 |
50 | }
51 |
52 | @Override
53 | public int getXPosition() {
54 | // TODO Auto-generated method stub
55 | return 0;
56 | }
57 |
58 | @Override
59 | public int getYPosition() {
60 | // TODO Auto-generated method stub
61 | return 0;
62 | }
63 |
64 | @Override
65 | public void introduce() {
66 | System.out.println("I am a brave adventurer!");
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Project Code/Lesson 14/SpriteGame/src/Player.java:
--------------------------------------------------------------------------------
1 | public class Player extends Character implements Fightable, Movable {
2 | public Player(String name) {
3 | this.setName(name);
4 | }
5 |
6 | @Override
7 | public void attack() {
8 | System.out.println("Player now attacking.");
9 | }
10 |
11 | @Override
12 | public void takeDamage(int damage) {
13 | // TODO Auto-generated method stub
14 | }
15 |
16 | @Override
17 | public int getMaxHp() {
18 | // TODO Auto-generated method stub
19 | return 0;
20 | }
21 |
22 | @Override
23 | public int getHpRemaining() {
24 | // TODO Auto-generated method stub
25 | return 0;
26 | }
27 |
28 | @Override
29 | public void moveNorth() {
30 | // TODO Auto-generated method stub
31 |
32 | }
33 |
34 | @Override
35 | public void moveEast() {
36 | // TODO Auto-generated method stub
37 |
38 | }
39 |
40 | @Override
41 | public void moveSouth() {
42 | // TODO Auto-generated method stub
43 |
44 | }
45 |
46 | @Override
47 | public void moveWest() {
48 | // TODO Auto-generated method stub
49 |
50 | }
51 |
52 | @Override
53 | public int getXPosition() {
54 | // TODO Auto-generated method stub
55 | return 0;
56 | }
57 |
58 | @Override
59 | public int getYPosition() {
60 | // TODO Auto-generated method stub
61 | return 0;
62 | }
63 |
64 | @Override
65 | public void introduce() {
66 | System.out.println("I am a brave adventurer!");
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Project Code/Lesson 2/Lesson2/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 3/Lesson3/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 10/Autonomous/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 5/CutPowerMode/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 6/GyroLights/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 6/GyroLights/src/main/java/frc/robot/commands/ToggleLightsBasedOnGyro.java:
--------------------------------------------------------------------------------
1 | // Copyright (c) FIRST and other WPILib contributors.
2 | // Open Source Software; you can modify and/or share it under the terms of
3 | // the WPILib BSD license file in the root directory of this project.
4 |
5 | package frc.robot.commands;
6 |
7 | import edu.wpi.first.wpilibj2.command.CommandBase;
8 | import frc.robot.subsystems.OnBoardIO;
9 |
10 | public class ToggleLightsBasedOnGyro extends CommandBase {
11 | OnBoardIO m_io;
12 |
13 | public ToggleLightsBasedOnGyro(OnBoardIO io) {
14 | m_io = io;
15 | addRequirements(io);
16 | }
17 |
18 | // Called when the command is initially scheduled.
19 | @Override
20 | public void initialize() {}
21 |
22 | // Called every time the scheduler runs while the command is scheduled.
23 | @Override
24 | public void execute() {
25 | double gyroAngle = m_io.m_drivetrain.m_gyro.getAngleZ();
26 |
27 | if (Math.abs(gyroAngle) < 5) {
28 | setLightsGreen();
29 | }
30 | else {
31 | setLightsRed();
32 | }
33 |
34 | System.out.println("Gyro angle: " + gyroAngle);
35 | }
36 |
37 | private void setLightsGreen() {
38 | m_io.setGreenLed(true);
39 | m_io.setRedLed(false);
40 | }
41 |
42 | private void setLightsRed() {
43 | m_io.setGreenLed(false);
44 | m_io.setRedLed(true);
45 | }
46 |
47 | // Called once the command ends or is interrupted.
48 | @Override
49 | public void end(boolean interrupted) {}
50 |
51 | // Returns true when the command should end.
52 | @Override
53 | public boolean isFinished() {
54 | return false;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Project Code/Lesson 7/GyroLights 2/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 9/DriveStraight/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 1/ExampleProject/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 11/DriveStraight/WPILib-License.md:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009-2021 FIRST and other WPILib contributors
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 | * Redistributions of source code must retain the above copyright
7 | notice, this list of conditions and the following disclaimer.
8 | * Redistributions in binary form must reproduce the above copyright
9 | notice, this list of conditions and the following disclaimer in the
10 | documentation and/or other materials provided with the distribution.
11 | * Neither the name of FIRST, WPILib, nor the names of other WPILib
12 | contributors may be used to endorse or promote products derived from
13 | this software without specific prior written permission.
14 |
15 | THIS SOFTWARE IS PROVIDED BY FIRST AND OTHER WPILIB CONTRIBUTORS "AS IS" AND
16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17 | WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT AND FITNESS FOR A PARTICULAR
18 | PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR
19 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 |
--------------------------------------------------------------------------------
/Project Code/Lesson 14/SpriteGame/src/SpriteGame.java:
--------------------------------------------------------------------------------
1 | import java.util.ArrayList;
2 |
3 | public class SpriteGame {
4 | public static void main(String... args) {
5 | Player player = new Player("Adventurer");
6 | Enemy goblin = new Enemy("Goblin");
7 | Enemy orc = new Enemy("Orc");
8 | NPC shopkeeper = new NPC("Shopkeeper");
9 | DestructibleObject suspiciousRock = new DestructibleObject();
10 |
11 | ArrayList