Updated Using Sensors (Blocks) (markdown)

FTC Engineering
2019-04-12 13:55:29 -04:00
parent 82a71a9e44
commit d63f15a54a

@ -36,9 +36,9 @@ Note that it will take an estimated 15 minutes to complete this task.
| 3. Click on the “Logic” category. Find and click on the “if do else” block.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep3ControlHub.jpg" width="175"></p> | | 3. Click on the “Logic” category. Find and click on the “if do else” block.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep3ControlHub.jpg" width="175"></p> |
| 4. Drag the “if do else” block to the position before the “telemetry.update” block.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep4ControlHub.jpg" width="400"></p> | | 4. Drag the “if do else” block to the position before the “telemetry.update” block.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep4ControlHub.jpg" width="400"></p> |
| 5. Click on the "Sensors" category to expand it (if it isn't already expanded). Click on the "Touch Sensor" subcategory, then find and select the ".isPressed" block.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep5ControlHub.jpg" width="400"></p> | | 5. Click on the "Sensors" category to expand it (if it isn't already expanded). Click on the "Touch Sensor" subcategory, then find and select the ".isPressed" block.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep5ControlHub.jpg" width="400"></p> |
| 6. Drag the “isPressed” block to the test condition of the “if do else” programming block.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep6ControlHub.jpg" width="300"></p> | | 6. Drag the “isPressed” block to the test condition of the “if do else” programming block.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep6ControlHub.jpg" width="400"></p> |
| 7. Click on the “Utilities” category on the left-hand side of your browser. Find and click on the “Telemetry” subcategory.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep7ControlHub.jpg" width="300"></p>Select the “call telemetry.addData” block (the text version) and drag it to the “do” clause of the “if do else” block. | | 7. Click on the “Utilities” category on the left-hand side of your browser. Find and click on the “Telemetry” subcategory.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep7ControlHub.jpg" width="400"></p>Select the “call telemetry.addData” block (the text version) and drag it to the “do” clause of the “if do else” block. |
| 8. Change the “key” value to “testTouch” and the “text” value to “is pressed”.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep8ControlHub.jpg" width="300"></p> | | 8. Change the “key” value to “testTouch” and the “text” value to “is pressed”.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep8ControlHub.jpg" width="400"></p> |
| 9. Insert another "telemetry.addData" block (the text version) to the "else" clause of the "if do else" block. Change the “key” value to “testTouch” and the “text” value to “is NOT pressed”.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep9ControlHub.jpg" width="400"></p> | | 9. Insert another "telemetry.addData" block (the text version) to the "else" clause of the "if do else" block. Change the “key” value to “testTouch” and the “text” value to “is NOT pressed”.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep9ControlHub.jpg" width="400"></p> |
| 10. 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/TouchSensorOpModeStep10ControlHub.jpg" width="400"></p> | | 10. 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/TouchSensorOpModeStep10ControlHub.jpg" width="400"></p> |
| 11. 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.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep11ControlHub.jpg" width="350"></p>As you run the op mode and push or release the button, the telemetry message on the Driver Station should update to reflect the current state of the digital Touch Sensor. | | 11. 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.<br/><br/><p align="center"><img src="https://github.com/FIRST-Tech-Challenge/WikiSupport/blob/master/ftc_app/images/TouchSensorOpModeStep11ControlHub.jpg" width="350"></p>As you run the op mode and push or release the button, the telemetry message on the Driver Station should update to reflect the current state of the digital Touch Sensor. |