Variable Motor Speed Test OpMode
The goal of this meeting was to build a test OpMode for the Mechanical/Engineering team to use with the prototype shooter. They wanted to be able to change the motor speed in increments of +/- 5 so that they could perform various tests with the launcher.
Nathan created a TeleOp OpMode and wrote the program while sharing his screen over the Discord video channel. He used the opportunity to show Charlie how to map functions to the controller buttons and talked about some best practices like putting an empty "repeat while" loop after the button presses. This eliminates the risk that the user holds the button down and the OpMode continuously changes the speed.
In addition to using the bumpers for +5 or -5 motor speed, Nathan assigned discrete values of 0, 25, 50, 75, and 100 to various controller buttons. That way, the testers won't need to press the button over-and-over to get to some of the more extreme values.
Nathan also helped troubleshoot an issue related to variables in the REV Hardware Client. Neither Charlie nor Nathan were able to create variables directly in the REV Hardware Client on their desktop. Nathan was able to temporarily work around the issue by creating the required variable directly on the phone and saving the OpMode to be edited in the Hardware Client. He also identified that the software would delete the variable if it wasn't used in the code, so he had to add a line assigning a value to the variable before it could be saved properly.
Action Required: Nathan and Coach Jeff will do further investigation to determine why variables could not be created directly in the REV Hardware Client.
Comments
Post a Comment