Guest User

Untitled

a guest
Apr 25th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #pragma config(Sensor, dgtl1, UpTouch, sensorTouch)
  2. #pragma config(Sensor, dgtl2, DownTouch, sensorTouch)
  3. #pragma config(Sensor, dgtl4, UpLimit, sensorTouch)
  4. #pragma config(Sensor, dgtl5, DownLimit, sensorTouch)
  5. #pragma config(Motor, port3, ArmMotor, tmotorNone, openLoop)
  6. //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
  7.  
  8. task main()
  9. {
  10.  
  11. while(true)
  12. {
  13. if(SensorValue(UpTouch)==1 && SensorValue(UpLimit)==0)
  14. {motor[ArmMotor]=40;}
  15. else if(SensorValue(DownTouch)==1 && SensorValue(DownLimit)==0)
  16. {motor[ArmMotor]=-40;}
  17. else {motor[ArmMotor]=0;}
  18. }
  19. }
Add Comment
Please, Sign In to add comment