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