MonoBrick EV3 Firmware
Public Member Functions | Protected Member Functions | Properties | List of all members
MonoBrickFirmware.Sensors.NXTColorSensor Class Reference
Inheritance diagram for MonoBrickFirmware.Sensors.NXTColorSensor:
MonoBrickFirmware.Sensors.AnalogSensor MonoBrickFirmware.Sensors.ISensor

Public Member Functions

 NXTColorSensor (SensorPort port)
 Initializes a new instance of the NXTColorSensor class in color mode More...
 
 NXTColorSensor (SensorPort port, ColorMode mode)
 Initializes a new instance of the NXTColorSensor class. More...
 
override string ReadAsString ()
 Reads the sensor value as a string. More...
 
int ReadRaw ()
 Read the raw value of the reflected or ambient light. In color mode the color index is returned More...
 
RGBColor ReadRGBColor ()
 Reads the color of the RGB. More...
 
int Read ()
 Read the intensity of the reflected or ambient light in percent. In color mode the color index is returned More...
 
Color ReadColor ()
 Reads the color. 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)
 

Protected Member Functions

int CalculateRawAverage ()
 
int CalculateRawAverageAsPct ()
 
void GetRawValues ()
 
void GetColorData ()
 
Color CalculateColor ()
 
- 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)
 

Properties

ColorMode Mode [get, set]
 Gets or sets the color mode. More...
 
- Properties inherited from MonoBrickFirmware.Sensors.AnalogSensor
AnalogMode AnalogMode [get, set]
 
SensorPort Port [get]
 
- Properties inherited from MonoBrickFirmware.Sensors.ISensor
SensorPort Port [get]
 Sensor port More...
 

Additional Inherited Members

- Protected Attributes inherited from MonoBrickFirmware.Sensors.AnalogSensor
const int ADCResolution = 4095
 
const int NumberOfSensorPorts = SensorManager.NumberOfSensorPorts
 
SensorPort port
 

Constructor & Destructor Documentation

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

Initializes a new instance of the NXTColorSensor class in color mode

MonoBrickFirmware.Sensors.NXTColorSensor.NXTColorSensor ( SensorPort  port,
ColorMode  mode 
)
inline

Initializes a new instance of the NXTColorSensor class.

Parameters
modeMode.

Member Function Documentation

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

Gets the name of the sensor.

Returns
The sensor name.

Implements MonoBrickFirmware.Sensors.AnalogSensor.

override int MonoBrickFirmware.Sensors.NXTColorSensor.NumberOfModes ( )
inlinevirtual

Numbers the of modes.

Returns
The number of modes

Implements MonoBrickFirmware.Sensors.AnalogSensor.

int MonoBrickFirmware.Sensors.NXTColorSensor.Read ( )
inline

Read the intensity of the reflected or ambient light in percent. In color mode the color index is returned

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

Reads the sensor value as a string.

Returns
The value as a string

Implements MonoBrickFirmware.Sensors.AnalogSensor.

Color MonoBrickFirmware.Sensors.NXTColorSensor.ReadColor ( )
inline

Reads the color.

Returns
The color.
int MonoBrickFirmware.Sensors.NXTColorSensor.ReadRaw ( )
inline

Read the raw value of the reflected or ambient light. In color mode the color index is returned

Returns
The raw value
RGBColor MonoBrickFirmware.Sensors.NXTColorSensor.ReadRGBColor ( )
inline

Reads the color of the RGB.

Returns
The RGB color.
override string MonoBrickFirmware.Sensors.NXTColorSensor.SelectedMode ( )
inlinevirtual

.m.-,

Returns
The mode.

Implements MonoBrickFirmware.Sensors.AnalogSensor.

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

Selects the next mode.

Implements MonoBrickFirmware.Sensors.AnalogSensor.

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

Selects the previous mode.

Implements MonoBrickFirmware.Sensors.AnalogSensor.

Property Documentation

ColorMode MonoBrickFirmware.Sensors.NXTColorSensor.Mode
getset

Gets or sets the color mode.

The color mode.


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