WeDoTiltSensor Class

Definition

WeDO tilt sensor

public class WeDoTiltSensor : Iot.Device.BuildHat.Sensors.ActiveSensor
type WeDoTiltSensor = class
    inherit ActiveSensor
Public Class WeDoTiltSensor
Inherits ActiveSensor
Inheritance
WeDoTiltSensor

Constructors

WeDoTiltSensor(Brick, SensorPort)

WeDo tilt sensor.

Properties

BaudRate

Baud rate the sensor is connected

(Inherited from ActiveSensor)
CombiModes

Gets the possible combi modes. Note, is will be empty if none.

(Inherited from ActiveSensor)
ContinousMeasurement

Gets or sets the continuous measurement for this sensor.

HardwareVersion

Hardware version

(Inherited from ActiveSensor)
IsConnected

Gets true if the sensor is connected.

(Inherited from Sensor)
ModeDetails

Gets the mode details of the sensor.

(Inherited from ActiveSensor)
NumberOfModes

Numbers the of modes.

(Inherited from ActiveSensor)
Port

Gets the Sensor port

(Inherited from Sensor)
PositionPid

Gets the recommended Speed PID settings

(Inherited from ActiveSensor)
SensorName

Gets the name of the sensor.

SensorType

Gets the sensor type

(Inherited from Sensor)
SoftwareVersion

Software version

(Inherited from ActiveSensor)
SpeedPid

Gets the recommended Speed PID settings

(Inherited from ActiveSensor)
Tilt

Gets the tilt. It's an angle from -45 to +45

ValuesAsString

Property to return the raw value of the sensort as a string. It will contains as the first elements PxCy. x = the port number, y = 0 for continuous reading, 1 for single reading. The rest are the measures.

(Inherited from ActiveSensor)

Methods

GetTilt()

Gets the tilt

OnPropertyChanged(String)

Raises the on property changed event.

(Inherited from Sensor)
OnPropertyUpdated(String)

Raises the on property updated event.

(Inherited from Sensor)
SelectCombiModesAndRead(Int32[], Boolean)

Returned the name of the selectd mode

(Inherited from ActiveSensor)
SelectModeAndRead(Int32, Boolean)

Returned the name of the selectd mode

(Inherited from ActiveSensor)
StopReading()

Stop reading continuous data from a specific sensor.

(Inherited from ActiveSensor)
SwitchOff(SensorPort)

Switches a sensor off.

(Inherited from ActiveSensor)
SwitchOn()

Switches a sensor on.

(Inherited from ActiveSensor)
WriteBytes(ReadOnlySpan<Byte>, Boolean)

Writes directly to the sensor. The bytes to the current port, the first one or two bytes being header bytes. The message is padded if necessary, and length and checksum fields are automatically populated.

(Inherited from ActiveSensor)

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