DCMotor Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Direct current (DC) motor
public abstract class DCMotor : IDisposable
type DCMotor = class
interface IDisposable
Public MustInherit Class DCMotor
Implements IDisposable
- Inheritance
-
DCMotor
- Derived
- Implements
Constructors
DCMotor(GpioController, Boolean) |
Constructs generic DCMotor instance |
DCMotor(GpioController) |
Fields
Controller |
Properties
Controller |
GpioController related with operations on pins |
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
Create(Int32, GpioController, Boolean) |
Creates DCMotor instance using only one pin which allows to control speed in one direction. |
Create(Int32, GpioController) | |
Create(Int32, Int32, GpioController, Boolean, Boolean) |
Creates DCMotor instance using two pins which allows to control speed in both directions. |
Create(Int32, Int32, GpioController) | |
Create(Int32, Int32, Int32, GpioController, Boolean) |
Creates DCMotor instance using three pins which allows to control speed in both directions. |
Create(Int32, Int32, Int32, GpioController) | |
Create(PwmChannel, Int32, GpioController, Boolean, Boolean) |
Creates DCMotor instance using two pins which allows to control speed in both directions. |
Create(PwmChannel, Int32, GpioController) | |
Create(PwmChannel, Int32, Int32, GpioController, Boolean) |
Creates DCMotor instance using three pins which allows to control speed in both directions. |
Create(PwmChannel, Int32, Int32, GpioController) | |
Create(PwmChannel) |
Creates DCMotor instance using only one pin which allows to control speed in one direction. |
Dispose() |
Releases the resources used by the DCMotor instance. |
Dispose(Boolean) |
Releases the resources used by the DCMotor instance. |
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 |