TINKER PiEDESIGN IN INDIA

Colour sensor TCS34725 with TinkerPie

Hold an object over it and read its colour.

TypeSmart sensors (I2C)
Connect toSENSOR port · 0x29
Givescolour, or 0-255 per part
SimulatorYes: a control appears under the simulated board

How it works

The TCS34725 has tiny light sensors with red, green, blue and clear filters, and a white LED that lights up the object. Comparing the red, green and blue parts tells you the colour.

How to wire it

Plug into any SENSOR 1-4 port (SDA, SCL, 3.3 V, GND). Each type has a fixed I2C address, so different types can share the bus.

Code

In blocks: Accessories category in TinkerPie Studio. As code:

// JavaScript
sensors.colourSensorColour()
sensors.colourSensor(ColourPart.Red)

// Arduino C++
sensors::colourSensorColour()
sensors::colourSensor(ColourPart::Red)

Good to know

Projects with the Colour sensor TCS34725

Colour detectiveHold something over a TCS34725 colour sensor: the whole matrix lights up in its colour.Sensor projects

Similar modules

More projects to try

Questions

Can I try the Colour sensor TCS34725 without buying one?

Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.

Why does my red object look orange?

Room light and distance change the result. Keep the distance the same, shade the sensor and compare readings of your own objects.