HTML

1.5.2JacobHoward.c

Mar 5th, 2019
510
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.33 KB | None | 0 0
  1. #pragma config(Sensor, dgtl12, green,          sensorLEDtoVCC)
  2. #pragma config(Motor,  port2,           rightMotor,    tmotorVex393_MC29, openLoop)
  3. #pragma config(Motor,  port3,           leftMotor,     tmotorVex393_MC29, openLoop)
  4. #pragma config(Motor,  port9,           servoMotor,    tmotorServoStandard, openLoop)
  5. //*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//
  6.  
  7. task main()
  8. {
  9.  
  10. /*
  11. startMotor(rightMotor, 63);
  12. startMotor(leftMotor, 63);
  13. wait(5);
  14. startMotor(rightMotor, -63);
  15. startMotor(leftMotor, -63);
  16. wait(2.5);
  17. stopMotor(rightMotor);
  18. stopMotor(leftMotor);
  19. */
  20.  
  21. /*
  22. startMotor(rightMotor, 63);
  23. wait(5);
  24. stopMotor(rightMotor);
  25. startMotor(leftMotor, -75);
  26. wait(2.5);
  27. stopMotor(leftMotor);
  28. startMotor(rightMotor, 127);
  29. startMotor(leftMotor, 127);
  30. wait(7.25);
  31. stopMotor(rightMotor);
  32. stopMotor(leftMotor);
  33. */
  34.  
  35. /*
  36. setServo(servoMotor, -127);
  37. wait(2);
  38. setServo(servoMotor, -63);
  39. wait(3);
  40. setServo(servoMotor, 0);
  41. wait(2);
  42. setServo(servoMotor, 63);
  43. wait(3);
  44. setServo(servoMotor, 127);
  45. wait(2);
  46. */
  47.  
  48. /*
  49. 1. No challenges were encountered during the making of this program.
  50.  
  51. 2. The servo motor could be used to position a claw since range of motion is limited. Also, the motors starting and stopping are essentially
  52. the most effective method of moving / stopping a vehicle.
  53. */
  54. }
Advertisement
Comments
  • User was banned
Add Comment
Please, Sign In to add comment