Created
January 25, 2019 20:01
-
-
Save acetousk/08067edd6b8476a72804b025f171d8b6 to your computer and use it in GitHub Desktop.
yeee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma config(Sensor, in1, progL1, sensorPotentiometer) | |
#pragma config(Sensor, in2, progzR1, sensorPotentiometer) | |
#pragma config(Sensor, dgtl1, , sensorQuadEncoder) | |
#pragma config(Sensor, dgtl3, , sensorQuadEncoder) | |
#pragma config(Sensor, dgtl5, , sensorSONAR_inch) | |
#pragma config(Sensor, dgtl7, , sensorSONAR_inch) | |
#pragma config(Motor, port1, intake1, tmotorVex393TurboSpeed_HBridge, openLoop) | |
#pragma config(Motor, port2, driveL1, tmotorVex393HighSpeed_MC29, openLoop) | |
#pragma config(Motor, port3, drive2, tmotorVex393HighSpeed_MC29, openLoop) | |
#pragma config(Motor, port4, drive3, tmotorVex393HighSpeed_MC29, openLoop) | |
#pragma config(Motor, port5, driveR1, tmotorVex393HighSpeed_MC29, openLoop) | |
#pragma config(Motor, port6, drive5, tmotorVex393HighSpeed_MC29, openLoop) | |
#pragma config(Motor, port7, drive6, tmotorVex393HighSpeed_MC29, openLoop) | |
#pragma config(Motor, port9, puncher, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port10, intake2, tmotorVex393TurboSpeed_HBridge, openLoop) | |
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// | |
task main(){ | |
while(true){ | |
if(vexRT[Btn6D]==1) | |
motor[intake2]=127; | |
else if(vexRT[Btn6U]==1) | |
motor[intake2]=-127; | |
else | |
motor[intake2]=0; | |
motor[driveL1]=vexRT[Ch3]*-1; | |
motor[drive2]=vexRT[Ch3]*-1; | |
motor[drive3]=vexRT[Ch3]*-1; | |
motor[driveR1]=vexRT[Ch2]; | |
motor[drive5]=vexRT[Ch2]; | |
motor[drive6]=vexRT[Ch2]; | |
if(vexRT[Btn5U]==1) | |
motor[puncher]=127; | |
else if( vexRT[Btn5D]==1) | |
motor[puncher]=-127; | |
else | |
motor[puncher]=0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment