void armUpTime(int x) { motorSet (motor3, -127) ; // arm up motorSet (motor4, 127) ; motorSet (motor7, -127) ; motorSet (motor8, 127) ; delay (x); armUpTrim(); }
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(); }
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); }
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); }
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); }
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); }