Module ColorSensor :: Class ColorSensor
[frames] | no frames]

Class ColorSensor

source code

GenericSensor.GenericSensor --+
                              |
                             ColorSensor

Instance Methods
 
__init__(self, port) source code
 
getValue(self)
Returns list of [red light reflected, green light reflected, blue light reflected, unknown value] or None, if detection fails.
source code
 
getColor(self)
Returns reference of the detected color or None, if detection fails.
source code

Inherited from GenericSensor.GenericSensor: getPortId, getPortLabel

Method Details

__init__(self, port)
(Constructor)

source code 
Overrides: GenericSensor.GenericSensor.__init__

getColor(self)

source code 

Returns reference of the detected color or None, if detection fails. See class Color for more details.