コード例 #1
0
ファイル: auto.c プロジェクト: SFUVEX/SFU-VEXProjects
void armUpTime(int x)
{


	motorSet (motor3, -127) ; // arm up
	motorSet (motor4, 127) ;
	motorSet (motor7, -127) ;
	motorSet (motor8, 127) ;

	delay (x);

		armUpTrim();
}
コード例 #2
0
ファイル: auto.c プロジェクト: SFUVEX/SFU-VEXProjects
void armUpTime(int millis)
{


	motorSet(ARM_MOTOR3, MOTOR_MAX); // arm up
	motorSet(ARM_MOTOR4, MOTOR_MAX);
	motorSet(ARM_MOTOR7, MOTOR_MAX);
	motorSet(ARM_MOTOR8, MOTOR_MAX);

	delay (millis);

	armUpTrim();
}
コード例 #3
0
ファイル: autoSubroutines.c プロジェクト: awiebe/Worlds_2.0
void armUp(int x) {
	int pot = analogRead(8);

	while (pot < x) {
		motorSet(MOTOR3, -127); // arm up
		motorSet(MOTOR4, 127);
		motorSet(MOTOR7, -127);
		motorSet(MOTOR8, 127);
		pot = analogRead(8);
	}

	armUpTrim();
	delay(300);
}
コード例 #4
0
ファイル: auto.c プロジェクト: SFUVEX/SFU-VEXProjects
void armUpEnc(int x)
{
	int encoder = 1;
	//int counts = encoderGet(encoder);

	//while (abs(counts) < x)
	{
		motorSet (motor3, -127) ; // arm up
		motorSet (motor4, 127) ;
		motorSet (motor7, -127) ;
		motorSet (motor8, 127) ;
	//	counts = encoderGet(encoder); //keep getting the value
	}

	armUpTrim();
	delay (300);
}
コード例 #5
0
ファイル: auto.c プロジェクト: SFUVEX/SFU-VEXProjects
void armUpEnc(int x)
{
	//int encoder = 1;
	//int counts = encoderGet(encoder);

	//while (abs(counts) < x)
	{
		motorSet(ARM_MOTOR1, -MOTOR_MAX); // arm up
		motorSet(ARM_MOTOR2, MOTOR_MAX);
		motorSet(ARM_MOTOR3, -MOTOR_MAX);
		motorSet(ARM_MOTOR4, MOTOR_MAX);
		//	counts = encoderGet(encoder); //keep getting the value
	}

	armUpTrim();
	delay (300);
}
コード例 #6
0
ファイル: auto.c プロジェクト: SFUVEX/SFU-VEXProjects
void armUpEnc(int x)
{

	int towerCount = encoderGet(TOWER_ENCODER);//documentation claims 360 ticks in 1 revolution
		printf("Height stop: %d > %d \n\r ",towerCount,x);

	while (towerCount > x)
	{
		motorSet(ARM_MOTOR3, MOTOR_MAX); // arm up
		motorSet(ARM_MOTOR4, MOTOR_MAX);
		motorSet(ARM_MOTOR7, MOTOR_MAX);
		motorSet(ARM_MOTOR8, MOTOR_MAX);

		towerCount = encoderGet(TOWER_ENCODER);
	}
	stopArm();

	armUpTrim();
	delay (300);
}