TCS34725 Color Sensor RGB Color Detect Color Sensing Recognition Switch Module Color Unit GROVE I2C

TCS34725 Color Sensor RGB Color Detect Color Sensing Recognition Switch Module Color Unit GROVE I2C

  • R 389.07
    Unit price per 
  • Save R 389.07
Tax included.

SKU:

Description:

COLOR is color recognition unit integrated TCS3472. Like its namesake, COLOR is able to detect color value and return RGB data to the host.

Identify color principle:

In the TCS3472, a 3*4 array of filtered photodiodes and a 16 bit analog-to-digital converters are embedded. Of the 12 photodiodes, 3 have red filters, 3 have green filters, 3 have blue filters and 3 have no filter(clear).

When detecting the color of an object, TCS3472 returns data from four channels: red(R), green(G), blue(B) and clear(C)(non-filtered). The response from the red, green and blue channels (RGB) can be used to determine a particular source’s chromaticity coordinates (x, y).

Chromaticity Calculation Process Overview:

When we get coordinates (x, y), please reference the below figure so as to get the recommended color.

This Unit communicates with the M5Core via the GROVE A interface(I2C). Address is 0x29.

Product Features:

  • Detection ran ge: -40?ƒ~85??/li>
  • GROVE interface, support UIFlow and for 
  • Two Le go-compatible holes
  • Product Size: 32.2mm x 24.2mm x 8.2mm
  • Product weight: 3.9g

Package Included:

  • 1x COLOR Unit
  • 1x Grove Cable

Application:

  • Product Color Verification
  • Color tracking robot

EasyLoader

<blockquote style="box-sizing: border-box; font-size: 16px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); text-size-adjust: none; margin: 2em 0px; overflow: visible; padding: 1.5em; border-width: var(--blockquote-border-width, 0); border-style: var(--blockquote-border-style); border-color: var(--blockquote-border-color); border-radius: var(--blockquote-border-radius); background: var(--blockquote-background); color: rgb(33, 37, 41); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quot;, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;; quotes: &quot;

1.EasyLoader is a simple and fast program burner, and each product page has a product-related case program for EasyLoader.

2.After downloading the software, double-click to run the application, connect the M5 device to the computer via the data cable, select the port parameters, and click "Burn" to start burning.

3.The CP210X (USB driver) needs to be installed before the EasyLoader is burned. Click here to view the driver installation tutorial

Example:

1. IDE

The code below is incomplete. To get the complete code, please click here.

  /*    Color test      hardware: M5Stack      please install the Adfruit TCS34725 library first ...  */  #include <Wire.h>  #include <M5Stack.h>  #include "Adafruit_TCS34725.h"    // declaration  uint16_t clear, red, green, blue;  #define commonAnode true // set to false if using a common cathode LED    // new a object  Adafruit_TCS34725 tcs;  tcs = Adafruit_TCS34725(TCS34725_INTEGRATIONTIME_50MS,TCS34725_GAIN_4X);    // initialization  M5.begin(true, false, false);  tcs.begin();  tcs.setIntegrationTime(TCS34725_INTEGRATIONTIME_154MS);  tcs.setGain(TCS34725_GAIN_4X);    // read data  tcs.getRawData(&red, &green, &blue, &clear);

After burnt this example, PC serial terminal will print original value RGBC(red, green, blue, clear).