Code: #pragma config(Motor, port2, RightRearDrive, tmotorVex393_MC29, openLoop) #pragma config(Motor, port3, RightFrontDrive, tmotorVex393_MC29, openLoop) #pragma config(Motor, port4, PinballShooter, tmotorVex393_MC29, openLoop) #pragma config(Motor, port8, LeftFrontDrive, tmotorVex393_MC29, openLoop) #pragma config(Motor, port9, LeftRearDrive, tmotorVex393_MC29, openLoop) //*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main() { while(true) // tank drive with left side ch 3 and right side ch 2 motor[LeftFrontDrive] = vexRT[Ch3]; motor[LeftRearDrive] = vexRT[Ch3]; motor[RightFrontDrive] = vexRT[Ch2]; motor[RightRearDrive] = vexRT[Ch2]; while(true)
if(vexRT[Btn6D] == 1) { //pull back pinball shooter motor[PinballShooter] = 127; } while(true) if(vexRT[Btn6U] == 1) { //reverse pinball shooter motor[PinballShooter] = -127; } } |