NXTUltraSonicSensor Class

Definition

Create a NXT Utrasonic sensor

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

Constructors

NXTUltraSonicSensor(Brick, SensorPort)

Initialize a NXT Ultrasonic sensor

NXTUltraSonicSensor(Brick, SensorPort, UltraSonicMode)

Initialize a NXT Ultrasonic sensor

NXTUltraSonicSensor(Brick, SensorPort, UltraSonicMode, Int32)

Initialize a NXT Ultrasonic sensor

Properties

Mode

Gets or sets the sonar mode.

PeriodRefresh

Period to refresh the notification of property changed in milliseconds

Port

Gets 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 supported modes

ReadAsString()

Reads distance as string

ReadDistance()

Read the distance in either centiinches or centimeter

ReadRaw()

The raw value from the sensor

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