Guest User

Untitled

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