Characteristic Locus
Inheritance object Motor > DCMotor
Inherited Members Motor.pca9685 object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString()
Namespace Meadow.Foundation.FeatherWings
Assembly MotorWing.dll

Syntax

public class DCMotor : Motor

Constructors

DCMotor(short, Pca9685)

Creates a DCMotor driver

Declaration
public DCMotor(short num, Pca9685 pca9685)

Parameters

Type Name Description
short num
Pca9685 pca9685

Exceptions

Type Condition
ArgumentException

Methods

PreciseSpeed(short)

Control the DC Motor speed/throttle

Declaration
public void PreciseSpeed(short speed)

Parameters

Type Name Description
short speed

The 12-bit PWM value, 0 is off, 4096 is on

Run(Commmand)

Controls the motor direction/action

Declaration
public virtual void Run(Commmand command)

Parameters

Type Name Description
Commmand command

The action

SetSpeed(short)

Control the DC Motor speed/throttle

Declaration
public override void SetSpeed(short speed)

Parameters

Type Name Description
short speed

The 8-bit PWM value, 0 is off, 255 is on

Overrides

Stop()

Stops the motor

Declaration
public void Stop()