示例#1
0
void armUpTime(int x)
{


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

	delay (x);

		armUpTrim();
}
示例#2
0
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
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
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
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
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);
}