Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma config(Sensor, S3, LIGHTSENSOR, sensorEV3_Color)
- #pragma config(Motor, motorB, LEFT, tmotorEV3_Large, PIDControl, driveLeft, encoder)
- #pragma config(Motor, motorC, RIGHT, tmotorEV3_Large, PIDControl, driveRight, encoder)
- //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
- task main()
- {
- while(1==1)
- {
- while(SensorValue(LIGHTSENSOR)<40)
- {
- motor[motorC]=0;
- motor[motorB]=40;
- }
- while(SensorValue(LIGHTSENSOR)>=40)
- {
- motor[motorC]=40;
- motor[motorB]=0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement