Edit

Share via


NXTSoundSensor Class

Definition

Create a NXT Sound sensor

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

Constructors

NXTSoundSensor(Brick, SensorPort)

Initialize a NXT Sound Sensor

NXTSoundSensor(Brick, SensorPort, Int32)

Initialize a NXT Sound Sensor

Properties

PeriodRefresh

Period to refresh the notification of property changed in milliseconds

Port

Return 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

ReadAsString()

Reads the sensor value as a string.

ReadRaw()

Reads the raw 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