Guest User

Untitled

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