コード例 #1
0
void backLightFlash() {
	for(int i = 0; i < 5; i++) {
		// Turns the backlight on (1)
		bLCDBacklight = 1;

		//Keeps the light on for 500 milliseconds
		wait1MSec(100);

		//Turns the backlight off (0)
		bLCDBacklight = 0;

		//Keeps the light off for 500 milliseconds
		wait1MSec(100);		
	}
}
コード例 #2
0
//comment
task main()
{
	while(true)
	{
		motor[launcherLeftMotor] = 60;
		motor[launcherRightMotor] = 60;

		wait1MSec(2000);

		motor[intakeMotor] = 127;
		wait1Msec(2000);
		motor[intakeMotor] = 0;

		motor[intakeMotor] = 127;
		wait1Msec(2000);
		motor[intakeMotor] = 0;

		motor[intakeMotor] = 127;
		wait1Msec(2000);
		motor[intakeMotor] = 0;

		motor[intakeMotor] = 127;
		wait1Msec(2000);
		motor[intakeMotor] = 0;
	}


}
コード例 #3
0
ファイル: Auton.c プロジェクト: sameetandpotatoes/Robotics
//Move arm to pick up and clamp section
void getNextSection(){
	if (!killSwitch){
		if (direction == -1){
			motor[arm] = -1 * speedArmAuton;
			if (firstTime){
				wait1Msec(850);
			} else {
				wait1MSec(450);
			}
			motor[arm] = 0;
		} else{
			moveArmToPreload(direction * speedArmAuton);
		}
		wait1Msec(150);
		//Close clamp on section
		SensorValue[pneuVal] = 0;
		SensorValue[shaftEncoder] = 0;
	}
}