C# Class BrickPi.Sensors.EV3TouchSensor

Inheritance: INotifyPropertyChanged, ISensor
Datei anzeigen Open project: Ellerbach/BrickPi Class Usage Examples

Public Methods

Method Description
EV3TouchSensor ( BrickPortSensor port ) : System

Initialise an EV3 Touch sensor

EV3TouchSensor ( BrickPortSensor port, int timeout ) : System

Initialize an EV3 Touch Sensor

GetSensorName ( ) : string
IsPressed ( ) : bool

Determines whether the touch sensor is pressed.

NumberOfModes ( ) : int
ReadAsString ( ) : string

Reads the sensor value as a string.

ReadRaw ( ) : int

Reads the raw sensor value

SelectNextMode ( ) : void
SelectPreviousMode ( ) : void
SelectedMode ( ) : string
UpdateSensor ( object state ) : void

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

Private Methods

Method Description
OnPropertyChanged ( string name ) : void
StopTimerInternal ( ) : void

Method Details

EV3TouchSensor() public method

Initialise an EV3 Touch sensor
public EV3TouchSensor ( BrickPortSensor port ) : System
port BrickPortSensor Sensor port
return System

EV3TouchSensor() public method

Initialize an EV3 Touch Sensor
public EV3TouchSensor ( BrickPortSensor port, int timeout ) : System
port BrickPortSensor Sensor port
timeout int Period in millisecond to check sensor value changes
return System

GetSensorName() public method

public GetSensorName ( ) : string
return string

IsPressed() public method

Determines whether the touch sensor is pressed.
public IsPressed ( ) : bool
return bool

NumberOfModes() public method

public NumberOfModes ( ) : int
return int

ReadAsString() public method

Reads the sensor value as a string.
public ReadAsString ( ) : string
return string

ReadRaw() public method

Reads the raw sensor value
public ReadRaw ( ) : int
return int

SelectNextMode() public method

public SelectNextMode ( ) : void
return void

SelectPreviousMode() public method

public SelectPreviousMode ( ) : void
return void

SelectedMode() public method

public SelectedMode ( ) : string
return string

UpdateSensor() public method

Update the sensor and this will raised an event on the interface
public UpdateSensor ( object state ) : void
state object
return void