Advertisement
Northgate_Robotics

VEX Competition Code Template (For copy and paste)

Apr 24th, 2017
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. #pragma config(Motor, port2, frontLeft, tmotorVex393_MC29, openLoop)
  2. #pragma config(Motor, port3, frontRight, tmotorVex393_MC29, openLoop)
  3. //*!!Code automatically generated by 'ROBOTC' configuration wizard!!*//
  4.  
  5. //Competition Control and Duration Settings
  6. #pragma platform(VEX)
  7. #pragma competitionControl(Competition)
  8. #pragma autonomousDuration(15) //These numbers should correspond with the number of
  9. #pragma userControlDuration(105) //seconds for autonomous/user control modes
  10. #include "Vex_Competition_Includes.c" //Main competition background code
  11.  
  12. void pre_auton()
  13. {
  14. // All activities that occur before the competition starts
  15. // Example: clearing encoders, setting servo positions, ...
  16. }
  17.  
  18. task autonomous()
  19. {
  20. //Put any code you want to be executed during autonomous inside of here.
  21. }
  22.  
  23. task usercontrol()
  24. {
  25. while(true){
  26. // This is where your while loop from before goes
  27. // Be sure to replace this code with your own!
  28.  
  29. motor[frontLeft] = vexRT[Ch3];
  30. motor[frontRight] = vexRT[Ch2];
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement