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

Class HTColorSensor

source code

GenericSensor.GenericSensor --+
                              |
                             HTColorSensor

Color names from brickpi3 library.

Instance Methods
 
__init__(self, port)
Abstraction of the HiTechnics Color Sensor.
source code
 
getValue(self)
Returns list of [color id, red light reflected, green light reflected, blue light reflected, ambient light] or None, if detection fails.
source code
 
getColor(self)
Returns reference of the detected color or None, if detection fails.
source code
 
getColorName(self)
Returns standard color name from brickpi3 library.
source code

Inherited from GenericSensor.GenericSensor: getPortId, getPortLabel

Class Variables
  colorNames = ["BLACK", "BLUE", "GREEN", "YELLOW", "RED", "WHITE"]
Method Details

__init__(self, port)
(Constructor)

source code 

Abstraction of the HiTechnics Color Sensor.

Overrides: GenericSensor.GenericSensor.__init__