Download Adafruit_TCS34725
To begin reading sensor data, you will need to install the
Adafruit_TCS34725
The easiest way to do that is to open up the Manage Libraries... menu in the Arduino IDE
Then search for Adafruit TCS34725 and click Install
We also have a great tutorial on Arduino library installation at:
http://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use
Test the Sensor
Run the TCS34725 test sketch to verify that your sensor is working properly.
Upload the sketch to your Aruduino or Flora and open the Serial Monitor to see the output. The sketch should print out basic color measurement parameters as shown below. Move the sensor around, cover it and/or expose it to different light sources to see how it reacts.
Color parameters reported are:
- Color Temperature - measured in Kelvin
- Lux - or Lumens per Square Meter
- R, G and B (filtered) values
- Clear (unfiltered) value
ColorView!
The ColorView sketch demonstrates reflected-light measurement using the on-board led. The white led is used to illuminate nearby objects and the sensor measures the light reflected from the object. The ColorView sketch then uses the RGB outputs of the sensor to drive an RGB led to match the color that is seen by the sensor!ColorView Components
In addition to a processor and a color sensor, you will need an RGB LED and some resistors:- 1x 1K ohm resistor (Brown, Black Red Gold)
- 2x 560 ohm resistor (Green Blue Brown Gold)
ColorView Wiring
In addition to the basic power and I2C wiring, you will need the following connections:- LED common anode (long pin) -> 5v.
- LED Red Pin -> 1K resistor -> Arduino Pin 3
- LED Green Pin -> 560 ohm resistor -> Arduino Pin 5
- LED Blue Pin -> 560 ohm resistor -> Arduino Pin 6
Page last edited March 08, 2024
Text editor powered by tinymce.