Skip to content

TCS34725 — R/G/B folder value (tcs34725_rgb)

What it does: Returns the numeric value of the selected color component (R, G or B) from the TCS34725 sensor.

tcs34725_rgb

Inputs

  • Field rgb_id: selection of initialized sensor.
  • Field col: color component selection (R, G, B).

Output

  • Number: intensity of the selected component (scale according to the library used).

When to use it

  • When you want your own color classification or signal filtering.
  • When logging color changes over time.

Tips and pitfalls

  • Ideally read all three folders and evaluate them together.
  • For a more stable result, keep the distance of the sensor from the object constant.

Usage example

example_tcs34725_init

Open example in ESP IDE

Generated Python example

value = rgb_sensor1.get_red()