Edit

Share via


DCMotorWithStartStop Class

Definition

Direct current (DC) motor with Start/Stop

C#
public class DCMotorWithStartStop : Iot.Device.DCMotor.DCMotor
Inheritance
DCMotorWithStartStop

Constructors

DCMotorWithStartStop(DCMotor)

Constructs instance with added Start() and Stop() as additional protection

Fields

Controller (Inherited from DCMotor)

Properties

Controller

GpioController related with operations on pins

(Inherited from DCMotor)
Enabled

Get or Set motor status.

Speed

Gets or sets the speed of the motor. Range is -1..1 or 0..1 for 1-pin connection. 1 means maximum speed, 0 means no movement and -1 means movement in opposite direction.

Methods

Dispose()

Releases the resources used by the DCMotor instance.

Dispose(Boolean)

Releases the resources used by the DCMotor instance.

(Inherited from DCMotor)
Start()

Enable motor operation.

Stop()

Disable motor operation.

Extension Methods

Backwards(DCMotor, Double)

Motor turns backwards at indicated speed

Forwards(DCMotor, Double)

Motor turns forwards at indicated speed

Stop(DCMotor)

Stops the Iot.Device.DCMotor

Applies to

Product Versions
.NET IoT Libraries 2.0.0, 2.1.0, 2.2.0