ButtonSensor Class

Definition

A simple passive button.

public class ButtonSensor : Iot.Device.BuildHat.Sensors.Sensor
type ButtonSensor = class
    inherit Sensor
Public Class ButtonSensor
Inherits Sensor
Inheritance
ButtonSensor

Constructors

ButtonSensor(Brick, SensorPort)

Button sensor.

Properties

IsConnected

Gets true if the sensor is connected.

(Inherited from Sensor)
IsPressed

Gets true when the button is pressed.

Port

Gets the Sensor port

(Inherited from Sensor)
SensorName

Gets the name of the sensor.

SensorType

Gets the sensor type

(Inherited from Sensor)

Methods

OnPropertyChanged(String)

Raises the on property changed event.

(Inherited from Sensor)
OnPropertyUpdated(String)

Raises the on property updated event.

(Inherited from Sensor)

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