CuttleServo

open class CuttleServo : Servo

Cuttlefish compatible servo. Contains a list of preset positions which can be appended to using the addPreset() function.

Constructors

Link copied to clipboard
constructor(revHub: CuttleRevHub, servoPort: Int)
Initialize servo using cuttlefish direct access system
constructor(hardwareMap: HardwareMap, name: String)
Initialize servo using hardwareMap

Properties

Link copied to clipboard
open var port: Int
Link copied to clipboard
Array of preset positions.

Functions

Link copied to clipboard
open fun addPreset(position: Double)
Add a position to the list of presets.
Link copied to clipboard
open fun enablePWM(enable: Boolean)
Enable or disable PWM on the servo port.
Link copied to clipboard
open fun getPosition(): Double
Get the target position of the servo.
Link copied to clipboard
open fun getPreset(preset: Int): Double
Get the value of a preset position.
Link copied to clipboard
open fun goToPreset(preset: Int)
Go to a preset position.
Link copied to clipboard
open fun setPosition(position: Double)
Set the target position of the servo