# Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/142/920/medium800thumb/adafruit_products_6479-05.jpg?1773324090)

The **Adafruit TCS3430 /&nbsp; TCS34303 (both names are used) Ambient Light Tri-Stimulus Color Sensor** is a modern take on the common 'RGB' color sensor: this time with CIE XYZ plus IR diode sensors rather than RGB, so you can match it to your existing color space.

![Top Down Front Shot of the Adafruit TCS34303 QT Tri-Stimulus Color Sensor.](https://cdn-learn.adafruit.com/assets/assets/000/142/966/medium800/adafruit_products_tcs3430_top.jpg?1773349982 )

It acts a bit differently than the color sensors folks are used to, where there are sensors at wavelengths&nbsp;437nm (X1), 574nm (X2), 537nm (Y) and 434nm (Z) and then the user is expected to calibrate it against a known color space analyzer for their application. For folks that want something that just spits out CIE and Lux data, the [OPT4048 is more complete](https://www.adafruit.com/product/6335). However, there may be some use cases for people who want the raw count data only!

![Side Profile Shot of the 4pin Stemma QT Connector on the Adafruit TCS34303 Color Sensor](https://cdn-learn.adafruit.com/assets/assets/000/142/967/medium800/adafruit_products_tcs3430_end_stemma.jpg?1773350042 )

To make the sensor easy to use, we've taken the TCS34303 and put it onto a breakout PCB along with support circuitry to let you use this little wonder with 3.3V (Feather/Raspberry Pi) or 5V (Arduino/ Metro328) logic levels. Additionally since it speaks I2C, you can easily connect it up with two wires (plus power and ground!).&nbsp; We've even included&nbsp;[SparkFun qwiic](https://www.sparkfun.com/qwiic)&nbsp;compatible**&nbsp;[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)**&nbsp;connectors for the I2C bus so&nbsp; **you don't even need to solder!** &nbsp;

Just wire up to your favorite micro and you can use our CircuitPython/Python or [Arduino drivers](https://github.com/adafruit/Adafruit_TCS3430) to easily interface with the TCS34303 and get XYZ+IR color readings in a minute!&nbsp; **QT Cable is not included** , [but we have a variety in the shop](https://www.adafruit.com/product/4399).&nbsp;

![Top Down Back Shot of the Adafruit TCS34303 next to a U.S. Quarter for Scale.](https://cdn-learn.adafruit.com/assets/assets/000/142/968/medium800/adafruit_products_tcs3430_bottom.jpg?1773350084 )

# Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor

## Pinouts

![Adafruit TCS34303 breakout seen from both top and bottom sides of the PCB.](https://cdn-learn.adafruit.com/assets/assets/000/142/969/medium800/adafruit_products_tcs3430_pinouts_header.png?1773350125 )

The fixed I2C address is **0x39**.

## Power Pins
- **Vin** - this is the power pin. Since the sensor chip uses 1.8VDC, we have included a voltage regulator on board that will take 3-5VDC and safely convert it to 1.8VDC. To power the board, give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V.
- **1V8** - this is the 1.8V output from the voltage regulator, you can grab up to 100mA from this if you like
- **GND** - common ground for power and logic

![Adafruit TCS34303 Tri-stimulus color sensor breakout with power pins VIN, 1V8, and GND highlighted](https://cdn-learn.adafruit.com/assets/assets/000/142/970/medium640/adafruit_products_pinouts_power.png?1773350983)

## I2C Data Pins
- **SCL&nbsp;** - the I2C clock pin, connect to your microcontroller's I2C clock line.
- **SDA** -&nbsp;the I2C data pin, connect to your microcontroller's I2C data line.
- **[STEMMA QT](https://learn.adafruit.com/introducing-adafruit-stemma-qt)&nbsp;-** These connectors allow you to connectors to dev boards with&nbsp; **STEMMA QT** connectors or to other things with&nbsp;[various associated accessories](https://www.adafruit.com/?q=JST%20SH%204)

![Adafruit TCS34303 Tri-stimulus color sensor breakout with i2c logic pins SDA, and SCL, highlighted](https://cdn-learn.adafruit.com/assets/assets/000/142/972/medium640/adafruit_products_pinouts_i2c.png?1773351229)

## Interrupt Pin
 **INT** - the interrupt pin. It is an open-drain interrupt. To use, connect the pin to a GPIO pin on your microcontroller.

![Adafruit TCS32303 Tri-stimulus color sensor breakout with the interrupt pin labeled "INT" highlighted](https://cdn-learn.adafruit.com/assets/assets/000/142/973/medium640/adafruit_products_pinouts_int.png?1773351303)

![Wiring illustration showing the TCS3430 breakout connected to a Feather RP2040 via STEMMA QT connection and the INT pin on the breakout connected to pin D9 on the feather via breadboard.](https://cdn-learn.adafruit.com/assets/assets/000/143/064/medium640/adafruit_products_interrupt_wiring_bb.png?1773774852)

## LED and LED Jumper
Above the left STEMMA QT connector there is a small red **ON** power indicator LED. When the breakout is powered this LED will turn on.&nbsp;

On the back of the TCS3403 breakout there is a jumper with a small trace between two pads that can be cut to disable the **ON** power indicator LED on the board.

![Adafruit TCS34303 breakout with the power indicator LED next to the STEMMA connector highlighted.](https://cdn-learn.adafruit.com/assets/assets/000/142/974/medium640/adafruit_products_pinouts_led.png?1773351354)

![TCS34303 breakout bottom side with LED jumper highlighted](https://cdn-learn.adafruit.com/assets/assets/000/142/975/medium640/adafruit_products_pinouts_bottom_led_jumper.png?1773351381)

# Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor

## CircuitPython and Python

It's easy to use the&nbsp; **TCS3430** with Python or CircuitPython, and the [Adafruit\_CircuitPython\_TCS3430](https://github.com/adafruit/Adafruit_CircuitPython_TCS3430) module. This module allows you to easily write Python code to read data from the sensor.

You can use this driver with any CircuitPython microcontroller board or with a computer that has GPIO and Python [thanks to Adafruit\_Blinka, our CircuitPython-for-Python compatibility library](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

## CircuitPython Microcontroller Wiring

First wire up a TCS3430 to your board exactly as shown below. Here's an example of wiring a Feather RP2040 to the sensor with I2C using one of the handy [**STEMMA QT**](https://learn.adafruit.com/introducing-adafruit-stemma-qt) connectors:

- **Board STEMMA 3V** to&nbsp; **sensor** **VIN (red wire)**  
- **Board STEMMA GND** to&nbsp; **sensor** **GND (black wire)**  
- **Board STEMMA SCL** to&nbsp; **sensor** **SCL (yellow wire)**  
- **Board STEMMA SDA** to&nbsp; **sensor** **SDA (blue wire)**

![Wiring illustration showing an Adafruit Feather RP2040 connected to the TCS3430 breakout via STEMMA QT connector](https://cdn-learn.adafruit.com/assets/assets/000/143/028/medium640/adafruit_products_circuitpython_stemma_bb.png?1773755505)

The following is the TCS3430 wired to a Feather RP2040 using a solderless breadboard:

- **Board 3V** to&nbsp; **sensor** **VIN (red wire)**  
- **Board GND** to&nbsp; **sensor** **GND (black wire)**  
- **Board SCL** to&nbsp; **sensor** **SCL (yellow wire)**  
- **Board SDA** to&nbsp; **sensor** **SDA (blue wire)**

![Wiring illustration showing an Adafruit Feather PR2040 connected to the TCS3430 breakout via 3V, GND, SCL, and SDA pins on a solderless breadboard ](https://cdn-learn.adafruit.com/assets/assets/000/143/029/medium640/adafruit_products_circuitpython_breadboard_bb.png?1773755849)

## Python Computer Wiring

Since there are _dozens_ of Linux computers/boards you can use, we will show wiring for Raspberry Pi. For other platforms, [please visit the guide for CircuitPython on Linux to see whether your platform is supported](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux).

Here's the Raspberry Pi wired with I2C using the STEMMA connector:

- **Pi 3V** to **sensor VIN (red wire)**  
- **Pi GND** to&nbsp; **sensor** **GND (black wire)**  
- **Pi SCL** to&nbsp; **sensor** **SCL (yellow wire)**  
- **Pi SDA** to&nbsp; **sensor** **SDA (blue wire)**

![Wiring illustration showing Adafruit TCS3430 breakout connected to a Raspberry Pi via Stemma QT cable connected to 3V, SDA, SCL, and GND on the Pi.](https://cdn-learn.adafruit.com/assets/assets/000/143/030/medium640/adafruit_products_raspi_stemma_bb.png?1773756062)

Here's the Raspberry Pi wired with I2C using a solderless breadboard:

- **Pi 3V** to **sensor VIN (red wire)**  
- **Pi GND** to&nbsp; **sensor** **GND (black wire)**  
- **Pi SCL** to&nbsp; **sensor** **SCL (yellow wire)**  
- **Pi SDA** to&nbsp; **sensor** **SDA (blue wire)**

![Wiring illustration showing the TCS3430 breakout connected to a Raspberry Pi pins 3V, SDA, SCL, and GND via a solderless breadboard.](https://cdn-learn.adafruit.com/assets/assets/000/143/031/medium640/adafruit_products_raspi_breadboard_bb.png?1773756218)

## Python Installation of TCS3430 Library

You'll need to install the **Adafruit\_Blinka** library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. [Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux)!

Once that's done, from your command line run the following command:

- `pip3 install adafruit-circuitpython-tcs3430`

If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!

## CircuitPython Usage

To use with CircuitPython, you need to first install the **Adafruit\_CircuitPython\_TCS3430** &nbsp;library, and its dependencies, into the **lib** folder on your **CIRCUITPY** drive. Then you need to update **code.py** with the example script.

Thankfully, we can do this in one go. In the example below, click the **Download Project Bundle** button below to download the necessary libraries and the **code.py** file in a zip file. Extract the contents of the zip file, and copy the **entire**  **lib**  **folder** and the **code.py** file to your **CIRCUITPY** drive.

Your **CIRCUITPY/lib** folder should contain the following folders and files:

- **adafruit\_bus\_device/**
- **adafruit\_register/**
- **adafruit\_tcs3430.mpy**

![CIRCUITPY drive screenshot showing required libraries](https://adafruit.github.io/Adafruit_CircuitPython_Bundle/tcs3430_tcs3430_simpletest.py.png )

## Python Usage

Once you have the library `pip3` installed on your computer, copy or download the following example to your computer, and run the following, replacing **code.py** with whatever you named the file:

`python3 code.py`

## Example Code

**If running CircuitPython:** Once everything is saved to the **CIRCUITPY** drive, [connect to the serial console](https://learn.adafruit.com/welcome-to-circuitpython/kattni-connecting-to-the-serial-console) to see the data printed out!

**If running Python:** The console output will appear wherever you are running Python.

https://github.com/adafruit/Adafruit_CircuitPython_TCS3430/blob/main/examples/tcs3430_simpletest.py

First, the sensor gets initialized over I2C. In the main loop the light channel data is read from the sensor and the values are printed to the serial console once per second.

![Serial output from the CircuitPython example code showing the TCS3430 initialized and light channel data being read from it](https://cdn-learn.adafruit.com/assets/assets/000/143/056/medium800/adafruit_products_circuitpython_example_output.png?1773773022 )

# Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor

## Python Docs

# Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor

## Arduino

Using the TCS3430 breakout with Arduino involves wiring up the breakout to your Arduino-compatible microcontroller, installing the [Adafruit\_TCS3430](https://github.com/adafruit/Adafruit_TCS3430) library, and running the provided example code.

## Wiring

Wire as shown for a&nbsp; **5V** board like an Uno. If you are using a **3V** board, like an Adafruit Feather, wire the board's 3V pin to the sensor **VIN**.

Here is an Adafruit Metro wired up to the sensor using the STEMMA QT connector:

- **Board 5V** to **breakout** **VIN (red wire)**  
- **Board GND** to **breakout** &nbsp;**GND (black wire)**  
- **Board SCL** to **breakout** &nbsp;**SCL (yellow wire)**  
- **Board SDA** to **breakout** &nbsp;**SDA (blue wire)**

![Wiring illustration showing Adafruit Metro wired to the TCS3430 breakout via STEMMA QT connector to pins 5V, GND, SCL, and SDA](https://cdn-learn.adafruit.com/assets/assets/000/143/058/medium640/adafruit_products_arduino_stemma_bb.png?1773773411)

Here is an Adafruit Metro wired up using a solderless breadboard:

- **Board 5V** to **breakout** **VIN (red wire)**  
- **Board GND** to **breakout** &nbsp;**GND (black wire)**  
- **Board SCL** to **breakout** **SCL (yellow wire)**  
- **Board SDA** to **breakout** &nbsp;**SDA (blue wire)**

![Wiring illustration showing Adafruit Metro connected to the TCS3430 breakout via solderless breadboard connected to pins 5V, GND, SCL, and SDA](https://cdn-learn.adafruit.com/assets/assets/000/143/059/medium640/adafruit_products_arduino_breadboard_bb.png?1773773629)

## Library Installation

You can install the **Adafruit\_TCS3430** library for Arduino using the Library Manager in the Arduino IDE.

![Arduino IDE showing the tools menu open with Manage Libraries highlighted](https://cdn-learn.adafruit.com/assets/assets/000/143/060/medium800/adafruit_products_arduino_lib_manager.png?1773773857 )

Click the **Manage Libraries ...** menu item, search for **Adafruit TCS3430** , and select the **Adafruit TCS3430** library:

![Arduino IDE library manager open with "Adafruit TCS3430" in the search box and library in the results list.](https://cdn-learn.adafruit.com/assets/assets/000/143/061/medium800/adafruit_products_arduino_install_library.png?1773773959 )

If asked about dependencies, click "Install all".

![Arduino IDE pop up window asking to install dependencies for the TCS3430 driver](https://cdn-learn.adafruit.com/assets/assets/000/143/062/medium800/adafruit_products_arduino_install_deps.png?1773774028 )

If the "Dependencies" window does not come up, then you already have the dependencies installed.

Warning: If the dependencies are already installed, you must make sure you update them through the Arduino Library Manager before loading the example!

## Example Code
https://github.com/adafruit/Adafruit_TCS3430/blob/main/examples/basictest/basictest.ino

Upload the sketch to your board and open up the Serial Monitor ( **Tools -\> Serial Monitor** ) at 115200 baud. You'll see the TCS3430 recognized over I2C. Then, the reading values of different light channels will be printed out to the Serial Monitor.

![Arduino IDE serial monitor pane showing output from the TCS3430 example code with light channel readings](https://cdn-learn.adafruit.com/assets/assets/000/143/063/medium800/adafruit_products_arduino_example_output.png?1773774533 )

# Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor

## Arduino Docs

# Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor

## Downloads

## Files

- [TCS3430 Datasheet](https://cdn-learn.adafruit.com/assets/assets/000/142/917/original/TCS3430_DS000464_4-00.pdf?1773322346)
- [TCS3430 ColorMatrix Calibration Document](https://cdn-learn.adafruit.com/assets/assets/000/143/027/original/TCS3430_colormatrix_calibration.pdf?1773691943)
- [EagleCAD PCB files on GitHub](https://github.com/adafruit/Adafruit-TCS3430-Ambient-Tri-Stimulus-Color-Sensor-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20TCS3430%20Ambient%20Tri-Stimulus%20Color%20Sensor.fzpz)

## Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/142/918/medium800/adafruit_products_schem.png?1773322593)

![](https://cdn-learn.adafruit.com/assets/assets/000/142/919/medium800/adafruit_products_fab.png?1773324154 dimensions are in inches)


## Primary Products

### Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor

[Adafruit TCS3430 / TCS34303 Ambient Tri-Stimulus Color Sensor](https://www.adafruit.com/product/6479)
The **Adafruit TCS3430 /&nbsp; TCS34303 (both names are used) Ambient Light Tri-Stimulus Color Sensor** is a modern take on the common 'RGB' color sensor: this time with CIE XYZ plus IR diode sensors rather than RGB, so you can match it to your existing color...

In Stock
[Buy Now](https://www.adafruit.com/product/6479)
[Related Guides to the Product](https://learn.adafruit.com/products/6479/guides)

## Featured Products

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long

[STEMMA QT / Qwiic JST SH 4-pin Cable - 100mm Long](https://www.adafruit.com/product/4210)
This 4-wire cable is a little over 100mm / 4" long and fitted with JST-SH female 4-pin connectors on both ends. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4210)
[Related Guides to the Product](https://learn.adafruit.com/products/4210/guides)
### STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable

[STEMMA QT / Qwiic JST SH 4-pin to Premium Male Headers Cable](https://www.adafruit.com/product/4209)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium Dupont male headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4209)
[Related Guides to the Product](https://learn.adafruit.com/products/4209/guides)
### STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets

[STEMMA QT / Qwiic JST SH 4-pin Cable with Premium Female Sockets](https://www.adafruit.com/product/4397)
This 4-wire cable is a little over 150mm / 6" long and fitted with JST-SH female 4-pin connectors on one end and premium female headers on the other. Compared with the chunkier JST-PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4397)
[Related Guides to the Product](https://learn.adafruit.com/products/4397/guides)
### JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic

[JST SH 4-pin Cable with Alligator Clips - STEMMA QT / Qwiic](https://www.adafruit.com/product/4398)
This cable will make it super easy to use our plug-and-play STEMMA QT boards with boards like Circuit Playground. On one end you get a Qwiic / STEMMA QT connector (technically known as a JST SH 4-pin plug)&nbsp; into 4 individual wires with grippy alligator clips. We're carrying these to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/4398)
[Related Guides to the Product](https://learn.adafruit.com/products/4398/guides)

## Related Guides

- [Adafruit TLV320DAC3100 I2S DAC](https://learn.adafruit.com/adafruit-tlv320dac3100-i2s-dac.md)
- [Adafruit ItsyBitsy ESP32](https://learn.adafruit.com/adafruit-itsybitsy-esp32.md)
- [Adafruit I2C to 8 Channel Solenoid Driver](https://learn.adafruit.com/adafruit-i2c-to-8-channel-solenoid-driver.md)
- [Introducing Feather RP2040 SCORPIO](https://learn.adafruit.com/introducing-feather-rp2040-scorpio.md)
- [Analog Knobs on Raspberry Pi 400 with CYBERDECK Hat](https://learn.adafruit.com/analog-knobs-on-raspberrypi-400-with-cyberdeck-hat.md)
- [3D Printed Daft Punk Helmet](https://learn.adafruit.com/3d-printed-daft-punk-helmet.md)
- [CircuitPython CLUE I Ching Caster](https://learn.adafruit.com/clue-i-ching-caster.md)
- [Adafruit Infrared IR Remote Transceiver](https://learn.adafruit.com/adafruit-infrared-ir-remote-transceiver.md)
- [Adafruit Terminal Block BFF](https://learn.adafruit.com/adafruit-terminal-block-bff.md)
- [Using Servos With CircuitPython and Arduino](https://learn.adafruit.com/using-servos-with-circuitpython.md)
- [Ultrasonic Sonar Distance Sensors](https://learn.adafruit.com/ultrasonic-sonar-distance-sensors.md)
- [Using MCP23008 & MCP23017 with CircuitPython](https://learn.adafruit.com/using-mcp23008-mcp23017-with-circuitpython.md)
- [Adafruit PiCowbell DVI Output](https://learn.adafruit.com/adafruit-picowbell-dvi-output.md)
- [Adafruit CAN Bus BFF](https://learn.adafruit.com/adafruit-can-bus-bff.md)
- [LED Noodle Holiday Tree](https://learn.adafruit.com/led-noodle-tree.md)
