Updated Controlling a Servo (Blocks) (markdown)
@ -51,5 +51,5 @@ Note that it will take an estimated 20 minutes to complete this task.
|
|||||||
| 23. Use a “gamepad1.A” block as the test condition for the second “else if” block. Drag a “set servoTest.position to” block to the do clause of the second “else if” block and modify the numeric value so that the servo’s position will be set to a value of 1.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/ControlServoStep23.jpg" width="300"></p>For this clause, if the “A” button is pressed on the #1 gamepad, the op mode will move the servo to the 180-degree position. |
|
| 23. Use a “gamepad1.A” block as the test condition for the second “else if” block. Drag a “set servoTest.position to” block to the do clause of the second “else if” block and modify the numeric value so that the servo’s position will be set to a value of 1.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/ControlServoStep23.jpg" width="300"></p>For this clause, if the “A” button is pressed on the #1 gamepad, the op mode will move the servo to the 180-degree position. |
|
||||||
| 24. Insert a “call telemetry.addData” block (numeric) before the “call Telemetry.update” block. Rename the key field to “Servo Position” and insert a “servoTest.Position” block for the number field.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/ControlServoStep24.jpg" width="300"></p>This set of blocks will send the current servo position value to the Driver Station while the op mode is running. |
|
| 24. Insert a “call telemetry.addData” block (numeric) before the “call Telemetry.update” block. Rename the key field to “Servo Position” and insert a “servoTest.Position” block for the number field.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/ControlServoStep24.jpg" width="300"></p>This set of blocks will send the current servo position value to the Driver Station while the op mode is running. |
|
||||||
| 25. Save your op mode and verify that it was saved successfully to the Robot Controller.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/ControlServoStep25.jpg" width="300"></p> |
|
| 25. Save your op mode and verify that it was saved successfully to the Robot Controller.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/ControlServoStep25.jpg" width="300"></p> |
|
||||||
| 26. Following the procedure outlined in the section titled [Running Your Op Mode](https://github.com/ftctechnh/ftc_app/wiki/Running-Your-Op-Mode) to run your updated op mode. Don’t forget to exit programming mode before selecting and running the op mode. Also, make sure that your gamepad is designated as User #1 before running your op mode.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/ControlServoStep26.jpg" width="175"></p>You should now be able to control the servo position with the colored buttons. The servo position should be displayed on the Driver Station. |
|
| 26. Follow the procedure outlined in the section titled [Running Your Op Mode](https://github.com/ftctechnh/ftc_app/wiki/Running-Your-Op-Mode) to run your updated op mode. Don’t forget to exit programming mode before selecting and running the op mode. Also, make sure that your gamepad is designated as User #1 before running your op mode.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/ControlServoStep26.jpg" width="175"></p>You should now be able to control the servo position with the colored buttons. The servo position should be displayed on the Driver Station. |
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user