Guest User

Untitled

a guest
Mar 24th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #pragma config(Sensor, dgtl1, upbotton, 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. {
  8. while(1 == 1)
  9. if(SensorValue(upbotton)==1)
  10. {
  11. motor[middle] = 40;
  12. }
  13.  
  14. else if(SensorValue (downbutton)==1)
  15. {
  16. motor[middle] = -40;
  17. }
  18. else
  19. {
  20. motor[middle] = 0;
  21. }
  22.  
  23. }
  24.  
  25.  
  26. }
  27.  
  28.  
  29.  
  30.  
  31. }
Add Comment
Please, Sign In to add comment