Arduino Color Recognition Tcs34725 Color Sensor And Neopixel
About the project
In this tutorial we are going to recognize a color of the paper and display this color on the Neopixel strip (8 led) using a TCS34725 Sensor
Platforms: Arduino, DFRobot, Visuino
Estimated time: 1 hour
License: GNU General Public License, version 3 or later (GPL3+)
Items used in this project
Step 1: What You Will Need
1 / 6
- Arduino UNO (or any other Arduino or ESP)
- WS2812 LED strip (8 led) or WS2812 LED Ring
- TCS34725 Color Sensor
- Jumper wires
- Visuino program: Download Visuino
Thank you PCBWay for supporting this tutorial and helping users learn more about electronics.
What I like about the PCBWay is that you can get 10 boards for approximately $5 which is really cost effective for professional made boards, not to mention how much time you save!
Go check them out here. They also offer a lot of other stuff in case you might need it like assembly, 3D printing, CNC machining and a lot more.
Step 3: The Circuit
- Connect Color Sensor pin VCC to Arduino pin 5V
- Connect Color Sensor pin GND to Arduino pin GND
- Connect Color Sensor pin SCL to Arduino pin SCL
- Connect Color Sensor pin SDA to Arduino pin SDA
- Connect First LedStrip pin VCC to Arduino pin 5V
- Connect First LedStrip pin GND to Arduino pin GND
- Connect First LedStrip pin DIN to Arduino Digital pin 6
1 / 2
Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2Step 5: In Visuino Add Components
1 / 2
- Add "Color Sensor TCS34725" component
- Add "NeoPixels" component
1 / 2
- Double click on the "NeoPixels1" and in the "PixelGroups" window drag "Single Color" to the left and in the properties window set the "Count Pixels" to 8 <<this is the number of LEDs on the LED Stripe in this case it is 8
- Close the "PixelGroups" window
- Connect "ColorSensor1" pin I2C [Control] to Arduino pin I2C [In]
- Connect "ColorSensor1" pin [Color] to "NeoPixels1" > "Color1" pin [Color]
- Connect "NeoPixels1" pin Out to Arduino Digital pin 6
In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.Step 9: Play
If you power the Arduino module, and put a colored paper over the sensor the Neopixels stripe will display the paper color.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this tutorial, you can download it and open it in Visuino: https://www.visuino.eu
Leave your feedback...