Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma config(Sensor, S3, lightSensor, sensorEV3_Color)
- //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
- task main()
- {
- //While the sensor does not read black it moves forward
- while(SensorValue(lightSensor) > 15)
- {
- motor[motorC] = 50;
- motor[motorB] = 50;
- }
- //Reverse
- motor[motorC] = -50;
- motor[motorB] = -50;
- wait1Msec(1000);
- }//End main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement