Advertisement
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, ArmMotor , tmotorVex393_MC29, openLoop)
- //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
- task main()
- {
- //Loop Forever
- while(1 == 1)
- {
- if(SensorValue[UpButton] == 1)
- {
- motor[ArmMotor] = 40;
- }
- else if(SensorValue[DownButton] == 1)
- {
- motor[ArmMotor] = -40;
- }
- else
- {
- motor[ArmMotor] = 0;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement