Advertisement
Guest User

Untitled

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