Template: TCS34725 Color Sensor Arduino Guide

From Waveshare Wiki
Jump to: navigation, search

The Arduino example is written for the Arduino UNO. If you want to connect it to other Arduino boards, you may need to change the connection.

Arduino

Hardware Connection

Sensor Arduino Description
VCC 5V Power input
GMD GND Power ground
SDA SDA I2C data input
SCL SCL I2C clock input
INT D5 Interrupt output (open drain output)
LED D6 Light emitting diode
TCS34725 Arduino 2.jpg

Examples

  • Download the demo codes to your PC and unzip them.
  • Install the Arduino IDE on your PC.
  • Go into TCS34725_Color_Sensor_code/Arduino/Color_Sensor.
  • Run the Color_Sensor.ino file.
  • Select the correct Board and the Port.
MQ5 Arduino 1.jpg
  • Build the project and upload it to the board.
  • Open the serial monitor of the Arduino IDE or the SSCOM software and check the serial data.
TCS34725 Arduino 1.jpg