Classifier

class Classifier(sectorOneSensor: NormalizedColorSensor, sectorTwoSensor: NormalizedColorSensor, sectorThreeSensor: NormalizedColorSensor, gate: Servo, classifier: Servo, rgb: RevBlinkinLedDriver) : Attachment

Classifier is an Attachment that classifies and releases artifacts.

Parameters

sectorOneSensor

the NormalizedColorSensor used to detect the color of the artifact

sectorTwoSensor

the NormalizedColorSensor used to detect the color of the artifact

sectorThreeSensor

the NormalizedColorSensor used to detect the color of the artifact

gate

the Servo used to open and close the gate that releases artifacts from the classifier

classifier

the Servo used to rotate the classifier to different positions

rgb

the LED driver used to control lights in the Classifier

Constructors

Link copied to clipboard
constructor(sectorOneSensor: NormalizedColorSensor, sectorTwoSensor: NormalizedColorSensor, sectorThreeSensor: NormalizedColorSensor, gate: Servo, classifier: Servo, rgb: RevBlinkinLedDriver)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
Link copied to clipboard
val state: StateFlow<AttachmentState>

Functions

Link copied to clipboard
fun goToPos(position: Int): Action

Rotates the classifier to the specified position (1, 2, or 3).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun releaseAllArtifacts(): Action

Releases all stored artifacts by opening the gate and rotating the classifier.

Link copied to clipboard

Releases an artifact of the specified type by positioning the classifier, opening the gate, and resetting the classifier.

Link copied to clipboard
Link copied to clipboard
open fun stop()
Link copied to clipboard
context(telemetry: Telemetry)
open override fun update()