EV3GyroSensor Class

Definition

Create a EV3 Gyro sensor

public class EV3GyroSensor : Iot.Device.BrickPi3.Sensors.ISensor, System.ComponentModel.INotifyPropertyChanged
type EV3GyroSensor = class
    interface INotifyPropertyChanged
    interface ISensor
Public Class EV3GyroSensor
Implements INotifyPropertyChanged, ISensor
Inheritance
EV3GyroSensor
Implements

Constructors

EV3GyroSensor(Brick, SensorPort)

Initialize an EV3 Gyro Sensor

EV3GyroSensor(Brick, SensorPort, GyroMode)

Initialize an EV3 Gyro Sensor

EV3GyroSensor(Brick, SensorPort, GyroMode, Int32)

Initialize an EV3 Gyro Sensor

Properties

Mode

Gets or sets the Gyro mode.

PeriodRefresh

Period to refresh the notification of property changed in milliseconds

Port

Sensor port

Value

Return the raw value of the sensor

ValueAsString

Return the raw value as a string of the sensor

Methods

GetSensorName()

Gets sensor name

NumberOfModes()

Number of modes supported

Read()

Read the gyro sensor value. The returned value depends on the mode.

ReadAsString()

Reads the sensor value as a string.

ReadRaw()

Read the sensor value

RotationCount()

Get the number of rotations (a rotation is 360 degrees) - only makes sense when in angle mode

SelectedMode()

Selected mode

SelectNextMode()

Moves to next mode

SelectPreviousMode()

Moves to previous mode

UpdateSensor(Object)

Update the sensor and this will raised an event on the interface

Events

PropertyChanged

To notify a property has changed. The minimum time can be set up with timeout property

Applies to