Servos
package com.seattlesolvers.solverslib.hardware
ServoEx
Constructors:
1. Regular (no Angle Control)
ServoEx(HardwareMap hwMap, String id)
ServoEx servoEx = new ServoEx(hardwareMap, "servoEx");2. Angle Control (with Min and Max angle)
ServoEx(HardwareMap hwMap, String id, double min, double max)// change the effective range to a min and max in DEGREES
servo.setRange(MIN_ANGLE, MAX_ANGLE);
// change the range to a min and max in RADIANS
servo.setRange(MIN_ANGLE, MAX_ANGLE, AngleUnit.RADIANS);
// return the effective range
double degreeRange = servo.getAngleRange();
// return the effective range in RADIANS
degreeRange = servo.getAngleRange(AngleUnit.RADIANS);3. Angle Control (with Range and AngleUnit)
Utility Methods:
Power Caching
CRServo
CRServoEx & AbsoluteAnalogEncoder
Constructors (AbsoluteAnalogEncoder)
1. Basic AbsoluteAnalogEncoder
2. Advanced CRServo
Constructors (CRServoEx)
1. Basic CRServo (Raw Power)
2. Positional Control with Encoder
3. Advanced Encoder Configuration
Using a CRServoEx RunMode
OptimizedPositionalControl
OptimizedPositionalControlRawPowerMode
RawPowerModePIDF Control
Power Caching
Example: Full Setup
Additional Methods
CRServoGroup
Last updated