Motor Class

Controls speed, acceleration, duration and direction of a motor. The Arduino pins assigned for motors are configured in the firmware settings.

Definition

Namespace: RoboTx.Api
Assembly: RoboTx.Api (in RoboTx.Api.dll) Version: 1.0.0
C#
public sealed class Motor
Inheritance
Object    Motor

Properties

DurationLapsed Returns true if a previously set duration for driving the motor has lapsed. Returns false otherwise. See DriveForDuration(Single, Single).

Methods

Drive(Int32) Drives the motor at a percentage of its maximum speed (either forward or reverse).
Drive(Single) Drives the motor at a percentage of its maximum speed (either forward or reverse).
DriveForDuration(Int32, Single) Drives the motor at a percentage of its maximum speed (either forward or reverse) for a specified duration.
DriveForDuration(Single, Single) Drives the motor at a percentage of its maximum speed (either forward or reverse) for a specified duration.
DriveNoAccel(Int32) Drives the motor at a percentage of its maximum speed (either forward or reverse) and overrides any previously set acceleration.
DriveNoAccel(Single) Drives the motor at a percentage of its maximum speed (either forward or reverse) and overrides any previously set acceleration.
SetAcceleration Configures motor acceleration by specifying the time (in seconds) it takes to reach maximum speed from stationary position.
StopAccelerating If motor is accelerating, holds the motor at the current speed.

See Also