MonoBrick EV3 Firmware
Public Member Functions | List of all members
MonoBrickFirmware.Sensors.NXTTouchSensor Class Reference

Class used for touch sensor. Works with both EV3 and NXT More...

Inheritance diagram for MonoBrickFirmware.Sensors.NXTTouchSensor:
MonoBrickFirmware.Sensors.AnalogSensor MonoBrickFirmware.Sensors.ISensor

Public Member Functions

 NXTTouchSensor (SensorPort port)
 Initializes a new instance of the MonoBrick.EV3.TouchSensor class in boolean mode More...
 
override string ReadAsString ()
 Reads the sensor value as a string. More...
 
int ReadRaw ()
 Reads the raw sensor value More...
 
bool IsPressed ()
 Determines whether the touch sensor is pressed. More...
 
int Read ()
 Read the value. Will return 1 or 0 More...
 
override string GetSensorName ()
 Gets the name of the sensor. More...
 
override void SelectNextMode ()
 Selects the next mode. More...
 
override void SelectPreviousMode ()
 Selects the previous mode. More...
 
override int NumberOfModes ()
 Numbers the of modes. More...
 
override string SelectedMode ()
 .m.-, More...
 
- Public Member Functions inherited from MonoBrickFirmware.Sensors.AnalogSensor
 AnalogSensor (SensorPort port)
 

Additional Inherited Members

- Protected Member Functions inherited from MonoBrickFirmware.Sensors.AnalogSensor
void SetMode (AnalogMode mode)
 
Int16 ReadPin1AsPct ()
 
int ReadPin6AsPct ()
 
int ReadPin1As10Bit ()
 Reads the value of pin 1 converted to 10 bit More...
 
int ReadPin1 ()
 
int ReadPin5 ()
 
int ReadPin6 ()
 
byte[] ReadBytes (int offset, int length)
 
- Protected Attributes inherited from MonoBrickFirmware.Sensors.AnalogSensor
const int ADCResolution = 4095
 
const int NumberOfSensorPorts = SensorManager.NumberOfSensorPorts
 
SensorPort port
 
- Properties inherited from MonoBrickFirmware.Sensors.AnalogSensor
AnalogMode AnalogMode [get, set]
 
SensorPort Port [get]
 

Detailed Description

Class used for touch sensor. Works with both EV3 and NXT

Constructor & Destructor Documentation

MonoBrickFirmware.Sensors.NXTTouchSensor.NXTTouchSensor ( SensorPort  port)
inline

Initializes a new instance of the MonoBrick.EV3.TouchSensor class in boolean mode

Member Function Documentation

override string MonoBrickFirmware.Sensors.NXTTouchSensor.GetSensorName ( )
inlinevirtual

Gets the name of the sensor.

Returns
The sensor name.

Implements MonoBrickFirmware.Sensors.AnalogSensor.

bool MonoBrickFirmware.Sensors.NXTTouchSensor.IsPressed ( )
inline

Determines whether the touch sensor is pressed.

Returns
true if the sensor is pressed; otherwise, false.
override int MonoBrickFirmware.Sensors.NXTTouchSensor.NumberOfModes ( )
inlinevirtual

Numbers the of modes.

Returns
The number of modes

Implements MonoBrickFirmware.Sensors.AnalogSensor.

int MonoBrickFirmware.Sensors.NXTTouchSensor.Read ( )
inline

Read the value. Will return 1 or 0

override string MonoBrickFirmware.Sensors.NXTTouchSensor.ReadAsString ( )
inlinevirtual

Reads the sensor value as a string.

Returns
The value as a string

Implements MonoBrickFirmware.Sensors.AnalogSensor.

int MonoBrickFirmware.Sensors.NXTTouchSensor.ReadRaw ( )
inline

Reads the raw sensor value

Returns
The raw.
override string MonoBrickFirmware.Sensors.NXTTouchSensor.SelectedMode ( )
inlinevirtual

.m.-,

Returns
The mode.

Implements MonoBrickFirmware.Sensors.AnalogSensor.

override void MonoBrickFirmware.Sensors.NXTTouchSensor.SelectNextMode ( )
inlinevirtual

Selects the next mode.

Implements MonoBrickFirmware.Sensors.AnalogSensor.

override void MonoBrickFirmware.Sensors.NXTTouchSensor.SelectPreviousMode ( )
inlinevirtual

Selects the previous mode.

Implements MonoBrickFirmware.Sensors.AnalogSensor.


The documentation for this class was generated from the following file: