Guest User

Untitled

a guest
Mar 24th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #pragma config(Sensor, dgtl1, upbutton, sensorTouch)
  2. #pragma config(Sensor, dgtl2, downbutton, sensorTouch)
  3. #pragma config(Motor, port2, middle, tmotorVex393_MC29, openLoop)
  4. //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
  5.  
  6. task main()
  7. { while(1 == 1)
  8.  
  9. if(SensorValue(upbutton)==1)
  10. {
  11.  
  12. motor[middle] = 40;
  13.  
  14. }
  15.  
  16. else if(SensorValue (downbutton)==1)
  17. {
  18.  
  19. motor[middle] = -40;
  20.  
  21. }
  22.  
  23. else
  24. {
  25.  
  26. motor[middle] = 0;
  27.  
  28. }
  29.  
  30. }
  31.  
  32. }
Add Comment
Please, Sign In to add comment