Turn motor when robot is enabled, control speed using joystick The goal is to turn the motor at 1/4 speed forward or backward, using the joystick, but only if the joystick trigger is being pressed. It is expected that you completed Lesson 1 and have the code available. The link to the Joystick documentation: https://first.wpi.edu/FRC/roborio/release/docs/cpp/classfrc_1_1Joystick.html In Robot.h we will need an object/variable that is the Joystick. The class/object type is: frc::Joystick We will name the object: m_joystick In Robot.h, in the 'private:' section add the following line: frc::Joystick m_joystick{0}; The '{0}' indicates the contructor will be called and '0' wil be passed in for the port parameter. The frc::Joystick class contains the method 'GetButton()', which is what we will use to see if the trigger is being pressed. The trigger is button 1. The frc:Joystick class contains the method 'GetY()', which will tell us the position of the joystick. The values will range from -1.0 to 1.0. In Robot.cpp, you will add the code in the Robot::OperatorControl() method. You will replace the 'm_motor.Set(0.25)' from lesson 1. You will want to first test if the trigger is pressed. If it is pressed, then you will look at the position to see if the position to determine how to turn the motor. Here is the pseudo code: if (trigger is pressed) { if (position is greater than 0.33) { spin motor forward 1/4 speed } else if (position is less than -0.33) { spin motor reverse 1/4 speed } else { stop motor } } The 0.33 and -0.33 is make sure the joystick has moved away from the center. Ideally, you would get 0 when the joystick is at the center. However, joysticks do not always go back to true 0. To stop a motor you send it a speed of 0. After you have modified Robot.h and Robot.cpp, build the project.