Running Your OpMode (All Languages)

If your op mode requires input from a gamepad, then you will need to connect a Logitech F310 gamepad to the Driver Station. Note that you can have up to two gamepads connected through a USB hub to a Driver Station. However, in this example, we will only have a solitary gamepad connected.

Note that you will need an estimated 10 minutes to complete this task.

Running Your Op Mode Instructions

1. Before you connect your gamepad to the phone, verify that the switch on the bottom of the gamepad is set to the “X” position.

../../../../_images/RunningOpModeStep11.jpg

2. Connect the gamepad to the Driver Station using the Micro USB OTG adapter cable.

../../../../_images/RunningOpModeStep21.jpg

3. For the examples in this wiki, the op modes are looking for input from the gamepad designated as the user or driver #1. Press the Start button and the A button simultaneously on the Logitech F310 controller to designate your gamepad as user #1.

../../../../_images/RunningOpModeStep31.jpg

Note that pushing the Start button and the B button simultaneously would designate the gamepad as user #2.

4. On the Driver Station screen, touch the triangular-shaped, “TeleOp” dropdown list button to display a list available op modes. You should see your recently saved op mode among the list of available op modes that reside on your Robot Controller.

../../../../_images/RunningOpModeStep4.jpg

Note that the word “TeleOp” is short for “Tele-Operated” and it implies a driver controlled op mode (i.e., an op mode that gets input from a human driver).

5. Select “MyFIRSTOpMode” to load your op mode on the Robot Controller.

../../../../_images/RunningOpModeStep5.jpg

Note that even though you are using the Driver Station to select the op mode, the actual op mode instructions will be executed on the Robot Controller phone.

  1. Press the INIT button to initialize your op mode.

../../../../_images/RunningOpModeStep6.jpg

7. Push the Start button (designated by the triangular-shaped symbol) to start the op mode run.

../../../../_images/RunningOpModeStep7.jpg

8. Use the left joystick of the gamepad to control the operation of the DC motor. As you manipulate the left joystick up and down, the target power and the motor power should be displayed in the lower left hand corner of the screen.

../../../../_images/RunningOpModeStep8.jpg

If you want to stop your op mode, press the square-shaped Stop button on the Driver Station.