Skip to content

Instantly share code, notes, and snippets.

@liamariemb
Last active November 4, 2016 01:24
Show Gist options
  • Save liamariemb/0e4cfe864672695072eac40126e4d89e to your computer and use it in GitHub Desktop.
Save liamariemb/0e4cfe864672695072eac40126e4d89e to your computer and use it in GitHub Desktop.
#pragma config(Sensor, dgtl1, up, sensorTouch)
#pragma config(Sensor, dgtl2, down, sensorTouch)
#pragma config(Motor, port6, armMotor, tmotorVex393_MC29, openLoop, encoderPort, I2C_3)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main()
{
//Loop Forever
while(1 == 1)
{
if(SensorValue[up] == 1)
{
motor[armMotor] = 30;
}
else if(SensorValue[down] == 1)
{
motor[armMotor] = -30;
}
else
{
motor[armMotor] = 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment