adafruit_tcs34725
¶
CircuitPython module for the TCS34725 color sensor. Ported from the micropython-adafruit-tcs34725 module by Radomir Dopieralski:
See examples/simpletest.py for an example of the usage.
- Author(s): Tony DiCola
-
class
adafruit_tcs34725.
TCS34725
(i2c, address=41)[source]¶ Driver for the TCS34725 color sensor.
-
active
¶ Get and set the active state of the sensor. Boolean value that will enable/activate the sensor with a value of True and disable with a value of False.
-
color_raw
¶ Read the raw RGBC color detected by the sensor. Returns a 4-tuple of 16-bit red, green, blue, clear component byte values (0-65535).
-
color_rgb_bytes
¶ Read the RGB color detected by the sensor. Returns a 3-tuple of red, green, blue component values as bytes (0-255).
-
cycles
¶ Get and set the persistence cycles of the sensor.
-
gain
¶ Get and set the gain of the sensor. Should be a value of 1, 4, 16, or 60.
-
integration_time
¶ Get and set the integration time of the sensor in milliseconds.
-
interrupt
¶ Get and clear the interrupt of the sensor. Returns a bool that’s True if the interrupt is set. Can be set to False (and only False) to clear the interrupt.
-
lux
¶ Return the detected light level in lux.
-
max_value
¶ Get and set the minimum threshold value (AIHT register) of the sensor as a 16-bit unsigned value.
-
min_value
¶ Get and set the minimum threshold value (AILT register) of the sensor as a 16-bit unsigned value.
-
temperature
¶ Return the detected color temperature in degrees.
-