Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #pragma config(Sensor, dgtl1, up, sensorTouch)
  2. #pragma config(Sensor, dgtl2, down, sensorTouch)
  3. #pragma config(Sensor, dgtl3, uplimit, sensorTouch)
  4. #pragma config(Sensor, dgtl4, downlimit, sensorTouch)
  5. #pragma config(Motor, port2, booom, tmotorServoContinuousRotation, openLoop)
  6.  
  7.  
  8. //++++++++++++++++++++++++++++++++++++++++ MAIN +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  9.  
  10. task main()
  11. {
  12.  
  13. while(true){
  14.  
  15. if ( SensorValue[uplimit] == 1){
  16. motor[booom] = -50;
  17.  
  18. }else if ( SensorValue[downlimit] == 1){
  19. motor[booom] = 50;
  20.  
  21. }else{
  22.  
  23.  
  24. }
  25. }
  26. }
  27. //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement