Edit

Share via


EV3UltraSonicSensor Class

Definition

Create a EV3 Ultrasound sensor

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

Constructors

EV3UltraSonicSensor(Brick, SensorPort)

Initialize an EV3 Ulrasonic sensor

EV3UltraSonicSensor(Brick, SensorPort, UltraSonicMode)

Initialize an EV3 Ultrasonic sensor

EV3UltraSonicSensor(Brick, SensorPort, UltraSonicMode, Int32)

Initialize an EV3 Ultrasonic 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 sensor value. Result depends on the mode

ReadAsString()

Reads the sensor value as a string.

ReadRaw()

Read the sensor value

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