PassiveMotor Class

Definition

Creates a passive motor

public class PassiveMotor : Iot.Device.BuildHat.Sensors.Sensor, Iot.Device.BuildHat.Motors.IMotor
type PassiveMotor = class
    inherit Sensor
    interface IMotor
Public Class PassiveMotor
Inherits Sensor
Implements IMotor
Inheritance
PassiveMotor
Implements

Constructors

PassiveMotor(Brick, SensorPort, SensorType)

Creates a passive motor.

Properties

IsConnected

Gets true if the sensor is connected.

(Inherited from Sensor)
Port

Gets the Sensor port

(Inherited from Sensor)
SensorName

Gets the name of the sensor.

SensorType

Gets the sensor type

(Inherited from Sensor)
Speed

Gets the speed of the motor speed is between -100 and +100

Methods

Float()

Floats the motor and stop all constraints on it.

GetMotorName()

Gets the name of the sensor.

GetSpeed()

Get the speed

OnPropertyChanged(String)

Raises the on property changed event.

(Inherited from Sensor)
OnPropertyUpdated(String)

Raises the on property updated event.

(Inherited from Sensor)
SetBias(Double)

Sets the bias of the motor.

SetPowerLimit(Double)

Sets the power consumption limit.

SetSpeed(Int32)

Set the speed of the motor

Start()

Start the motor

Start(Int32)

Start with the specified speed

Stop()

Stop the Motor

Events

PropertyChanged

To notify a property has changed. It means the value has changed.

(Inherited from Sensor)
PropertyUpdated

To notify a property has been updated. It means the property has been updated regardeless of a change in its value.

(Inherited from Sensor)

Applies to