Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #pragma config(Sensor, S3, lightSensor, sensorEV3_Color)
  2. //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
  3.  
  4. task main()
  5. {
  6. //While the sensor does not read black it moves forward
  7. while(SensorValue(lightSensor) > 15)
  8. {
  9. motor[motorC] = 50;
  10. motor[motorB] = 50;
  11. }
  12.  
  13. //Reverse
  14. motor[motorC] = -50;
  15. motor[motorB] = -50;
  16. wait1Msec(1000);
  17. }//End main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement