TriWheels

object TriWheels : API

An API for controlling the wheels of a triangle robot.

Properties

Link copied to clipboard
lateinit var blue: DcMotor
Link copied to clipboard
lateinit var green: DcMotor
Link copied to clipboard
open val isLinear: Boolean = false

Specifies whether this API requires a LinearOpMode to function.

Link copied to clipboard
lateinit var red: DcMotor

Functions

Link copied to clipboard
open fun dependencies(): Set<API>

A function that returns a Set of all other APIs it depends on to function.

Link copied to clipboard
fun drive(radians: Double, magnitude: Double, rotation: Double = 0.0)

Makes the robot drive in a certain direction radians with a given strength magnitude.

Link copied to clipboard
fun driveWithRotation(radians: Double, magnitude: Double, rotation: Double)

Does the same thing as drive but it rotates the robot with a given rotation too.

Link copied to clipboard
open override fun init(opMode: OpMode)

Initializes the API to use the given opMode.

Link copied to clipboard
fun power(redPower: Double, greenPower: Double, bluePower: Double)

Sets the power of each wheel respectively.

Link copied to clipboard
fun rotate(power: Double)

Rotates the wheels with a given power.

Link copied to clipboard
fun stop()

Makes all 3 wheels stop.

Link copied to clipboard

This function resets all 3 motors.