Package com.pocolifo.robobase.motor
Class DoubleCRServo
java.lang.Object
com.pocolifo.robobase.motor.DoubleCRServo
- All Implemented Interfaces:
 AutoCloseable
Represents a synchronized two-motor assembly, such as an intake, an outtake, linear slides, etc.
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionDoubleCRServo(com.qualcomm.robotcore.hardware.CRServo servo1, com.qualcomm.robotcore.hardware.CRServo servo2, double servoPowerCoefficient) Instantiate aDoubleCRServo. - 
Method Summary
 
- 
Field Details
- 
servo1
public final com.qualcomm.robotcore.hardware.CRServo servo1TheDcMotors associated with this motor. - 
servo2
public final com.qualcomm.robotcore.hardware.CRServo servo2 
 - 
 - 
Constructor Details
- 
DoubleCRServo
public DoubleCRServo(com.qualcomm.robotcore.hardware.CRServo servo1, com.qualcomm.robotcore.hardware.CRServo servo2, double servoPowerCoefficient) Instantiate aDoubleCRServo. Also uses an encoder.- Parameters:
 servo1- The firstCRServothat is associated with thisDoubleCRServo.servo2- The secondCRServothat is associated with thisDoubleCRServo. MUST BE THE SAME KIND OF MOTOR!servoPowerCoefficient- Coefficient of power for servos
 
 - 
 - 
Method Details
- 
spin
public void spin(com.qualcomm.robotcore.hardware.DcMotorSimple.Direction direction) Starts moving the motor at a given speed.- Parameters:
 direction- Determines the direction the motor should rotate.
 - 
stopMoving
public void stopMoving()Stop the movement of the motor. - 
close
public void close()Closes the internalCRServodevices. THIS SHOULD BE CALLED WHEN MOTORS ARE DONE BEING USED!- Specified by:
 closein interfaceAutoCloseable
 
 -