From f47e3907e65c692d68454d92c573776389b8f4b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=89=E3=83=A9?= Date: Sun, 9 Aug 2026 22:22:12 -0500 Subject: [PATCH 1/7] Add some extra lines for explaining what a task will accomplish --- .../stage1b/command-based-kitbot-pt2.mdx | 19 +++++++++---- .../stage1/stage1b/command-based-kitbot.mdx | 27 +++++++++++++------ .../stage1/stage1b/spot-the-error.mdx | 3 +++ 3 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot-pt2.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot-pt2.mdx index 3c70234c..335a9614 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot-pt2.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot-pt2.mdx @@ -15,7 +15,7 @@ import { TabItem, Tabs } from '@astrojs/starlight/components'; In this second part of the kitbot rewrite, you will: -1. Create a `Drivetrain` mechanism class. +1. Create a `Drivetrain` mechanism class to allow for control of the drivetrain. 2. Define an `arcadeDrive` command that dynamically reads controller inputs using `DoubleSupplier`s. 3. Bind the default drivetrain command in your teleop OpMode to enable driving. 4. Define some basic autonomous modes. @@ -23,8 +23,7 @@ In this second part of the kitbot rewrite, you will: ### Task 1: The Drivetrain Mechanism Create a new file named `Drivetrain.java` in the `mechanisms` package. -Then, -copy-paste the following code into the file: +Then, copy-paste the following code into the file: @@ -40,6 +39,8 @@ copy-paste the following code into the file: +This contains the basic setup for the class. + Then implement the following: 1. An `idle()` command that commands `0.0` speed and `0.0` rotation, and is set as the default command in the constructor. @@ -66,11 +67,13 @@ Then implement the following:
Item 3, Hint 2 We want to configure our motors when a new `Drivetrain` instance is created. - What java declaration defines the code that runs when a class is instantiated? + What Java declaration defines the code that runs when a class is instantiated?
### Task 2: Drivetrain Setup +Now that we have a `Drivetrain` class, we need to set it up to be used in our robot code. + 1. Create a `Drivetrain` instance in `Robot.java` named `drivetrain`. It should be a public instead of private. 2. Call `drivetrain.periodic();` in the `robotPeriodic` method. @@ -104,7 +107,9 @@ Then implement the following: ### Task 3: Create Auto Mode Files -Create 2 java files in the `opmode` package, named `DriveStraightAutoMode.java` and `TurnInPlaceAutoMode.java`, +We need to create two new files to define our autonomous OpModes. + +Create 2 Java files in the `opmode` package, named `DriveStraightAutoMode.java` and `TurnInPlaceAutoMode.java`, before deleting the `MyAuto.java` file. Copy-paste the following code in each file, while replacing `MyOpModeName` with the correct name for each opmode: @@ -115,6 +120,8 @@ while replacing `MyOpModeName` with the correct name for each opmode: ### Task 3: Drive Straight Autonomous +This auto will drive the robot straight forwards for 4 seconds. + In the `start()` method of `DriveStraightAutoMode.java`, schedule an `arcadeDrive` command with a timeout of 4 seconds. Then, do the following: @@ -146,6 +153,8 @@ Then, do the following: ### Task 4: Rotate in Place Command +This command will rotate the robot a certain number of degrees. + Create a new `Command` in `Drivetrain.java`, called `rotateInPlace`, with the parameters `double angleDegrees` and `DoubleSupplier rotationThrottle`. It should execute these actions, in order: diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx index c7a52718..02b5d734 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx @@ -56,19 +56,27 @@ the robot class' `robotPeriodic()` method. ``` +
+ What does `Scheduler.getDefault().run()` do? + The command scheduler is in charge of running all the commands that are + active, and handling any mechanism requirements that those commands may + have. Calling this method runs the scheduler, and therefore all active + commands, for one iteration. +
+ ### Task 2: The Feeder Mechanism Create a new package named `mechanisms` under the `robot` package. -Remember that -packages are folders that contain java files. -The `mechanisms` package -will contain the code for our feeder and intake launcher mechanisms. +Remember that packages are folders that contain java files. +The `mechanisms` package will contain the code for our feeder and intake launcher mechanisms. Then, create a new file in the `mechanisms` package named `Feeder.java`. +This will be used to control the feeder. Define a class named `Feeder` that implements `Mechanism`, then add the following: 1. A private `TalonFX` or `SparkMax` motor controller object, named `motor`, with an ID of 5. - It is connected to a systemcore CANBus with ID 0. + It is connected to a Systemcore CANBus with ID 0. + This will be used to control the feeder motor at CANBus ID 5 on bus ID 0. 2. A `feed()` command that sets the throttle of the motor to 0.75 forever. 3. An `intake()` command that sets the throttle of the motor to -1 forever. 4. An `outtake()` command that sets the throttle of the motor to 1 forever. @@ -127,7 +135,8 @@ Create a file named `IntakeLauncher.java` in the `mechanisms` package. Define a class named `IntakeLauncher` that implements `Mechanism`; then, add the following: 1. A private `TalonFX` or `SparkMax` motor controller object, named `motor`, with an ID of 4. - It is connected to a systemcore CANBus with ID 0. + It is connected to a Systemcore CANBus with ID 0. + This will be used to control the motor at CANBus ID 4 on bus ID 0. 2. A `shoot()` command that waits 2 seconds, then sets the throttle of the motor to 0.9 forever. 3. A `intake()` command that sets throttle to 0.8 forever. 4. A `outtake()` command that sets throttle to -0.8 forever. @@ -154,6 +163,8 @@ Define a class named `IntakeLauncher` that implements `Mechanism`; then, add the ### Task 4: Finish the `Robot` class +Now that we have the mechanism classes created, we need to set them up in the `Robot` class. + Create new instances of the `IntakeLauncher` and `Feeder` classes. They should be public properties of the `Robot` class, so that they are accessible from opmodes. @@ -170,10 +181,10 @@ Which method should it be? ### Task 5: Finish the teleop OpMode -In the constructor of the teleop opmode (it should be in `MyTeleop.java`), +In the constructor of the teleop OpMode (it should be in `MyTeleop.java`), create a private `CommandXboxController` instance named `xbox`. -In your opmode constructor, define the following behavior: +In your OpMode constructor, define the following behavior: 1. While the `xbox.leftBumper()` trigger is active, run the `robot.intakeLauncher.intake()` and `robot.feeder.intake()` commands. diff --git a/src/content/docs/learning-course/stage1/stage1b/spot-the-error.mdx b/src/content/docs/learning-course/stage1/stage1b/spot-the-error.mdx index abc4eb6f..9ecfc247 100644 --- a/src/content/docs/learning-course/stage1/stage1b/spot-the-error.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/spot-the-error.mdx @@ -70,6 +70,9 @@ Can you spot the error? ### Exercise 3 +This fails to compile, with the error shown in the comment. +It also has a logic error. + {/* rli:ignore */} ```java From 211755ddbb7af7852c24e580a08eb03f9bb3c447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=89=E3=83=A9?= Date: Mon, 10 Aug 2026 11:28:37 -0500 Subject: [PATCH 2/7] Address comments and move the hint for `implements Mechanism` --- .../stage1/stage1b/command-based-kitbot.mdx | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx index 02b5d734..b247fdae 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx @@ -70,13 +70,21 @@ Create a new package named `mechanisms` under the `robot` package. Remember that packages are folders that contain java files. The `mechanisms` package will contain the code for our feeder and intake launcher mechanisms. -Then, create a new file in the `mechanisms` package named `Feeder.java`. -This will be used to control the feeder. -Define a class named `Feeder` that implements `Mechanism`, then add the following: +Then, create a new Java class in the `mechanisms` package named `Feeder.java`, which will be used to control the feeder. +The `Feeder` class should implement `Mechanism`. -1. A private `TalonFX` or `SparkMax` motor controller object, named `motor`, with an ID of 5. - It is connected to a Systemcore CANBus with ID 0. - This will be used to control the feeder motor at CANBus ID 5 on bus ID 0. +
+ Hint + A mechanism is defined as a class with the `implements Mechanism` keyword at the end. + ```java #feederDef + + ``` + +
+ +Then, add the following: + +1. A private `TalonFX` or `SparkMax` motor controller object, named `motor`, with CAN ID 5 on Systemcore CANBus 0. 2. A `feed()` command that sets the throttle of the motor to 0.75 forever. 3. An `intake()` command that sets the throttle of the motor to -1 forever. 4. An `outtake()` command that sets the throttle of the motor to 1 forever. @@ -86,20 +94,13 @@ Define a class named `Feeder` that implements `Mechanism`, then add the followin The `feed()`, `intake()`, `outtake()` and `idle()` commands should be returned from methods.
- Item 1, Hint 1 - A mechanism is defined as a class with the `implements Mechanism` keyword at the end. - ```java #feederDef - - ``` - -
-
- Item 1, Hint 2 (CTRE only) - For CTRE devices, a `CANBus` object can be created via `CANBus.systemcore(id)`. + Item 1, Hint 1 (CTRE only) + For CTRE devices, a `CANBus` object can be created via + `CANBus.systemcore(id)`.
{/* prettier-ignore */}
- Item 1, Hint 3 + Item 1, Hint 2 Remember that `TalonFX` and `SparkMax` are classes, and that creating objects within another class is done like so:
{/* rli:ignore */} @@ -134,9 +135,7 @@ to allow for simulation to work: Create a file named `IntakeLauncher.java` in the `mechanisms` package. Define a class named `IntakeLauncher` that implements `Mechanism`; then, add the following: -1. A private `TalonFX` or `SparkMax` motor controller object, named `motor`, with an ID of 4. - It is connected to a Systemcore CANBus with ID 0. - This will be used to control the motor at CANBus ID 4 on bus ID 0. +1. A private `TalonFX` or `SparkMax` motor controller object, named `motor`, with ID 4 on Systemcore bus 0. 2. A `shoot()` command that waits 2 seconds, then sets the throttle of the motor to 0.9 forever. 3. A `intake()` command that sets throttle to 0.8 forever. 4. A `outtake()` command that sets throttle to -0.8 forever. @@ -163,7 +162,7 @@ Define a class named `IntakeLauncher` that implements `Mechanism`; then, add the ### Task 4: Finish the `Robot` class -Now that we have the mechanism classes created, we need to set them up in the `Robot` class. +Now that we have the mechanism classes created, we need to instantiate them in the `Robot` class. Create new instances of the `IntakeLauncher` and `Feeder` classes. They should be From 3c18003f225dd77d2e8b820ae0962a255781c6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=89=E3=83=A9?= Date: Tue, 11 Aug 2026 22:05:35 -0500 Subject: [PATCH 3/7] Try to see if tab switching CTRE/REV would integrate cleanly for task instructions? --- .../stage1/stage1b/command-based-kitbot.mdx | 62 ++++++++++++------- 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx index b247fdae..7f3b0e2a 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx @@ -84,20 +84,34 @@ The `Feeder` class should implement `Mechanism`. Then, add the following: -1. A private `TalonFX` or `SparkMax` motor controller object, named `motor`, with CAN ID 5 on Systemcore CANBus 0. -2. A `feed()` command that sets the throttle of the motor to 0.75 forever. -3. An `intake()` command that sets the throttle of the motor to -1 forever. -4. An `outtake()` command that sets the throttle of the motor to 1 forever. -5. An `idle()` command that sets the throttle of the motor to 0 forever. - Make this the default command. + + + 1. A private `TalonFX` motor controller object, named `motor`, with CAN ID 5 on Systemcore CANBus 0. + 2. A `feed()` command that sets the throttle of the motor to 0.75 forever. + 3. An `intake()` command that sets the throttle of the motor to -1 forever. + 4. An `outtake()` command that sets the throttle of the motor to 1 forever. + 5. An `idle()` command that sets the throttle of the motor to 0 forever. + Make this the default command. + +
+ Item 1, Hint 1 + For CTRE devices, a `CANBus` object can be created via + `CANBus.systemcore(id)`. +
+
+ + 1. A private `SparkMax` motor controller object, named `motor`, with CAN ID 5 on Systemcore CANBus 0. + 2. A `feed()` command that sets the throttle of the motor to 0.75 forever. + 3. An `intake()` command that sets the throttle of the motor to -1 forever. + 4. An `outtake()` command that sets the throttle of the motor to 1 forever. + 5. An `idle()` command that sets the throttle of the motor to 0 forever. + Make this the default command. + + +
The `feed()`, `intake()`, `outtake()` and `idle()` commands should be returned from methods. -
- Item 1, Hint 1 (CTRE only) - For CTRE devices, a `CANBus` object can be created via - `CANBus.systemcore(id)`. -
{/* prettier-ignore */}
Item 1, Hint 2 @@ -135,16 +149,22 @@ to allow for simulation to work: Create a file named `IntakeLauncher.java` in the `mechanisms` package. Define a class named `IntakeLauncher` that implements `Mechanism`; then, add the following: -1. A private `TalonFX` or `SparkMax` motor controller object, named `motor`, with ID 4 on Systemcore bus 0. -2. A `shoot()` command that waits 2 seconds, then sets the throttle of the motor to 0.9 forever. -3. A `intake()` command that sets throttle to 0.8 forever. -4. A `outtake()` command that sets throttle to -0.8 forever. -5. A `idle()` command that sets throttle to 0 forever. - Make this the default command. -6. The code needed for simulating the intake launcher. - You haven't officially learned - how to do this, but task 2's final section gives a hint. - Can you figure it out? + + + 1. A private `TalonFX` motor controller object, named `motor`, with ID 4 + on Systemcore bus 0. + + + 1. A private `SparkMax` motor controller object, named `motor`, with ID + 4 on Systemcore bus 0. + + +2. A `shoot()` command that waits 2 seconds, then sets the throttle of the motor +to 0.9 forever. 3. A `intake()` command that sets throttle to 0.8 forever. 4. A +`outtake()` command that sets throttle to -0.8 forever. 5. A `idle()` command +that sets throttle to 0 forever. Make this the default command. 6. The code +needed for simulating the intake launcher. You haven't officially learned how to +do this, but task 2's final section gives a hint. Can you figure it out?
Item 2 Hint From 264fde2d2e91f310430d4f2c5be3acd5aad87527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=89=E3=83=A9?= Date: Tue, 11 Aug 2026 22:17:37 -0500 Subject: [PATCH 4/7] Make the tab switching better --- .../stage1/stage1b/command-based-kitbot.mdx | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx index 7f3b0e2a..e0eae7e6 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx @@ -93,11 +93,26 @@ Then, add the following: 5. An `idle()` command that sets the throttle of the motor to 0 forever. Make this the default command. + The `feed()`, `intake()`, `outtake()` and `idle()` commands should be returned from methods. +
Item 1, Hint 1 For CTRE devices, a `CANBus` object can be created via `CANBus.systemcore(id)`.
+ {/* prettier-ignore */} +
+ Item 1, Hint 2 + Remember that `TalonFX` is a class, and that creating objects within another + class is done like so:
+ {/* rli:ignore */} + ```java + private TypeOfClass myMotor = new TypeOfClass(); + ``` + First, figure out what to replace `TypeOfClass` with. Next, + add the appropriate constructor parameters by hovering over + the red squiggly line. +
1. A private `SparkMax` motor controller object, named `motor`, with CAN ID 5 on Systemcore CANBus 0. @@ -106,25 +121,25 @@ Then, add the following: 4. An `outtake()` command that sets the throttle of the motor to 1 forever. 5. An `idle()` command that sets the throttle of the motor to 0 forever. Make this the default command. + + The `feed()`, `intake()`, `outtake()` and `idle()` commands should be returned from methods. + +
+ Item 1 Hint + Remember that `SparkMax` is a class, and that creating objects within another + class is done like so:
+ {/* rli:ignore */} + ```java + private TypeOfClass myMotor = new TypeOfClass(); + ``` + First, figure out what to replace `TypeOfClass` with. Next, + add the appropriate constructor parameters by hovering over + the red squiggly line. +
-The `feed()`, `intake()`, `outtake()` and `idle()` commands should be returned from methods. - -{/* prettier-ignore */} -
- Item 1, Hint 2 - Remember that `TalonFX` and `SparkMax` are classes, and that creating objects within another - class is done like so:
- {/* rli:ignore */} - ```java - private TypeOfClass myMotor = new TypeOfClass(); - ``` - First, figure out what to replace `TypeOfClass` with. Next, - add the appropriate constructor parameters by hovering over - the red squiggly line. -
Items 2-4, Hint 1 Re-read the "Defining Commands" and "Combining Commands and Mechanisms" From 07844f167ff410858dbcb80c5dd25b21bd28e38d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=89=E3=83=A9?= Date: Tue, 11 Aug 2026 22:56:16 -0500 Subject: [PATCH 5/7] Address Adriana's comments for Pt1 from the Discord --- .../src/main/java/sources/CommandBasedKitbot.java | 4 ++-- .../stage1/stage1b/command-based-kitbot.mdx | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandBasedKitbot.java b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandBasedKitbot.java index f98703d0..196a2c4f 100644 --- a/examples/stage1/stage1b/snippets/src/main/java/sources/CommandBasedKitbot.java +++ b/examples/stage1/stage1b/snippets/src/main/java/sources/CommandBasedKitbot.java @@ -45,9 +45,9 @@ public MyTeleop(Robot robot) { private final ExampleMotor motor = new ExampleMotor(); // [feederSim] - private final SingleFlywheelSim sim = new SingleFlywheelSim(motor, "Feeder"); + private final SingleFlywheelSim sim = new SingleFlywheelSim(motor, "Feeder"); // Create a flywheel simulation - public void periodic() { + public void periodic() { // Update the simulation sim.periodic(); } // [/feederSim] diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx index e0eae7e6..39e13d2c 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx @@ -159,6 +159,8 @@ to allow for simulation to work: ``` +This code creates a `SingleFlywheelSim` object named `sim` that simulates the feeder by representing it as a single spinning flywheel, then updates the simulation in `sim.periodic()`. + ### Task 3: The IntakeLauncher Mechanism Create a file named `IntakeLauncher.java` in the `mechanisms` package. @@ -191,7 +193,7 @@ do this, but task 2's final section gives a hint. Can you figure it out? ```java #feederSim ``` - Change one thing, and copy-paste the code into `IntakeLauncher.java`. + Copy-paste the code into `IntakeLauncher.java`, and change one thing.
@@ -199,9 +201,8 @@ do this, but task 2's final section gives a hint. Can you figure it out? Now that we have the mechanism classes created, we need to instantiate them in the `Robot` class. -Create new instances of the `IntakeLauncher` and `Feeder` classes. -They should be -public properties of the `Robot` class, so that they are accessible from opmodes. +Go to the `Robot` class and create new instances of the `IntakeLauncher` and `Feeder` classes. +They should be public properties of the `Robot` class, so that they are accessible from OpModes. Name them `intakeLauncher` and `feeder`, respectively. You also need to call `intakeLauncher.periodic();` and `feeder.periodic();` From 6b1563073d763ecfe69c7fe2eaa965fab5e0c7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=89=E3=83=A9?= Date: Fri, 14 Aug 2026 15:27:51 -0500 Subject: [PATCH 6/7] Resolve Daniel's comment --- .../stage1/stage1b/command-based-kitbot.mdx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx index 39e13d2c..922fed1b 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx @@ -176,12 +176,11 @@ Define a class named `IntakeLauncher` that implements `Mechanism`; then, add the 4 on Systemcore bus 0. -2. A `shoot()` command that waits 2 seconds, then sets the throttle of the motor -to 0.9 forever. 3. A `intake()` command that sets throttle to 0.8 forever. 4. A -`outtake()` command that sets throttle to -0.8 forever. 5. A `idle()` command -that sets throttle to 0 forever. Make this the default command. 6. The code -needed for simulating the intake launcher. You haven't officially learned how to -do this, but task 2's final section gives a hint. Can you figure it out? +2. A `shoot()` command that waits 2 seconds, then sets the throttle of the motor to 0.9 forever. +3. A `intake()` command that sets throttle to 0.8 forever. +4. A `outtake()` command that sets throttle to -0.8 forever. +5. A `idle()` command that sets throttle to 0 forever. Make this the default command. +6. The code needed for simulating the intake launcher. You haven't officially learned how to do this, but task 2's final section gives a hint. Can you figure it out?
Item 2 Hint From 102cbaae509bf246d4d1a273f604e531bac9a2b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=89=E3=83=A9?= Date: Fri, 14 Aug 2026 17:33:19 -0500 Subject: [PATCH 7/7] Temp fix for failing prettier formatting --- .../stage1/stage1b/command-based-kitbot.mdx | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx index 922fed1b..db832232 100644 --- a/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx +++ b/src/content/docs/learning-course/stage1/stage1b/command-based-kitbot.mdx @@ -176,11 +176,23 @@ Define a class named `IntakeLauncher` that implements `Mechanism`; then, add the 4 on Systemcore bus 0. -2. A `shoot()` command that waits 2 seconds, then sets the throttle of the motor to 0.9 forever. -3. A `intake()` command that sets throttle to 0.8 forever. -4. A `outtake()` command that sets throttle to -0.8 forever. -5. A `idle()` command that sets throttle to 0 forever. Make this the default command. -6. The code needed for simulating the intake launcher. You haven't officially learned how to do this, but task 2's final section gives a hint. Can you figure it out? +
    +
  1. + A `shoot()` command that waits 2 seconds, then sets the throttle of the + motor to 0.9 forever. +
  2. +
  3. A `intake()` command that sets throttle to 0.8 forever.
  4. +
  5. A `outtake()` command that sets throttle to -0.8 forever.
  6. +
  7. + A `idle()` command that sets throttle to 0 forever. Make this the + default command. +
  8. +
  9. + The code needed for simulating the intake launcher. You haven't + officially learned how to do this, but task 2's final section gives a + hint. Can you figure it out? +
  10. +
Item 2 Hint