|Arduino tutorial part #4|How to connect arduino| with Colour sensor|IN HINDI|TECH UTKARSH|

  • 4 years ago
Components required:-
Arduino Uno X1:-

Colour sensor X1:-

Male to female jumper wires:-

In this Arduino Tutorial we will learn how to detect colors using Arduino and the TCS230 / TCS3200 Color Sensor.

How TCS230 Color Sensor Works

The TCS230 senses color light with the help of an 8 x 8 array of photodiodes. Then using a Current-to-Frequency Converter the readings from the photodiodes are converted into a square wave with a frequency directly proportional to the light intensity. Finally, using the Arduino Board we can read the square wave output and get the results for the color.

TCS230 Color Sensor Source Code

First we need to define the pins to which the sensor is connected and define a variable for reading the frequency. In the setup section we need to define the four control pins as outputs and the sensor output as an Arduino input. Here we also need to set the frequency-scaling, for this example I will set it to 20%, and start the serial communication for displaying the results in the Serial Monitor.

In the loop section, we will start with reading the red filtered photodiodes. For that purpose we will set the two control pins S2 and S3 to low logic level. Then using the “pulseIn()” function we will read the output frequency and put it into the variable “frequency”. Using the Serial.print() function we will print the result on the serial monitor. The same procedure goes for the two other colors, we just need to adjust the control pins for the appropriate color.

coding details here click the link:-https://drive.google.com/folderview?id=13aYFDtp3nwNGfo9x9Z1XcjulaehCuwnW

Facebook page:- https://m.facebook.com/techutkarsh5/?ref=bookmarks

Instagram:- https://www.instagram.com/vatts_utkarsh/

Recommended