#pragma config(Sensor, dgtl1, limitSwitch, sensorTouch) #pragma config(Motor, port2, leftMotor, tmotorVex393_MC29, openLoop) #pragma config(Motor, port4, , tmotorVex393_MC29, openLoop) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// /* Project Title: 1.5.4 Team Members: Jacob H, Joshua R, Gabriel J Date: 3-8-19 Section: Task Description:oscilate gear in both directions a total of 20 times Pseudocode: */ task main() { /* repeat(20) // Code in the brackets below will be repeated 20 times before proceeding to the stopMotor command { startMotor(leftMotor, 63); // Start motor wait(.5); // Wait .5 seconds before proceeding startMotor(leftMotor, -63); // Start motor wait(.5); // Wait .5 seconds before proceeding } stopMotor(leftMotor); // End program */ // 4: This is a open loop system; the loop will continue until time stops it, no external input is required // 5: In relatively the same location, it doesn't have much reason to change logiaclly. /* repeat(20) // Code in the brackets below will be repeated 20 times before proceeding to the stopMotor command { startMotor(leftMotor, -63); // Start motor in the counterclockwise direction untilBump(limitSwitch); // Proceed to spin counterclockwise until switch is activated startMotor(leftMotor, 63); // Start motor in the clockwise direction wait(.5); // Proceed to spin in clockwise direction for .5 seconds (loop back to start until 20 repetitions have occurred) } stopMotor(leftMotor); // End program */ // 10: This is a closed loop system; external sensor input is required to continue and eventually end the program // 11: The gear assembly should, like the last program, end in the same location since it will be instructed to change direction at the same point every time // 12: If the program is meant to run constantly, it should not be instructed to stop by non-emergency external sensor input /* 1: An example of an open loop system could be a wind turbine, since this would only be stopped by the event of no wind. 2: An example of a closed loop system may be a light switch, since the light will continue to operate until shut off manually. */ }