Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #pragma config(Sensor, S3, LIGHTSENSOR, sensorEV3_Color)
  2. #pragma config(Motor, motorB, LEFT, tmotorEV3_Large, PIDControl, driveLeft, encoder)
  3. #pragma config(Motor, motorC, RIGHT, tmotorEV3_Large, PIDControl, driveRight, encoder)
  4. //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
  5.  
  6. task main()
  7. {
  8. while(1==1)
  9. {
  10.  
  11. while(SensorValue(LIGHTSENSOR)<40)
  12. {
  13. motor[motorC]=0;
  14. motor[motorB]=40;
  15. }
  16.  
  17. while(SensorValue(LIGHTSENSOR)>=40)
  18. {
  19. motor[motorC]=40;
  20. motor[motorB]=0;
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement