Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma config(Sensor, dgtl1, up, sensorTouch)
- #pragma config(Sensor, dgtl2, down, sensorTouch)
- #pragma config(Motor, port2, midmotor, tmotorVex393_MC29, openLoop)
- //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
- task main()
- {
- while (1==1)
- {
- if(SensorValue(up)==1)
- {
- motor[midmotor] =40;
- }
- else if(SensorValue(down)==1)
- {
- motor[midmotor] = -40;
- }
- else
- {
- motor[midmotor] = 0;
- }
- }
- }
Add Comment
Please, Sign In to add comment