Это видео недоступно.
Сожалеем об этом.
TCS3200 COLOR SENSOR WITH ARDUINO.
HTML-код
- Опубликовано: 17 авг 2024
- This is a beginners guide of how to use the TCS3200 Color sensor with Arduino and how to deal with some of the challenges that may arise when using this sensor.
Subscribe to my channel: bit.ly/2LiMpF0
========Recommended products from Amazon ========
WINGONEER Color Sensor Color Recognition Module TCS230 TCS3200: amzn.to/36JPBzh
For the code and schematics visit the link: mytectutor.com...
DISCLAIMER: This video description contains affiliate links. If you buy any item using these product links, I may receive a small commission. I would appreciate your support in this way!
Interesting tutorial. I can't wait to use the colour sensor in more of my projects. so many possibilities. Clear instructions thanks for making this.
Thanks for sharing this information. Very helpful. And you are a great teacher.
// TCS230 or TCS3200 pins wiring to Arduino
#define S0 4
#define S1 5
#define S2 6
#define S3 7
#define sensorOut 8
// Stores frequency read by the photodiodes
int redFrequency = 0;
int greenFrequency = 0;
int blueFrequency = 0;
void setup() {
// Setting the outputs
pinMode(S0, OUTPUT);
pinMode(S1, OUTPUT);
pinMode(S2, OUTPUT);
pinMode(S3, OUTPUT);
// Setting the sensorOut as an input
pinMode(sensorOut, INPUT);
// Setting frequency scaling to 20%
digitalWrite(S0,HIGH);
digitalWrite(S1,LOW);
// Begins serial communication
Serial.begin(9600);
}
void loop() {
// Setting RED (R) filtered photodiodes to be read
digitalWrite(S2,LOW);
digitalWrite(S3,LOW);
// Reading the output frequency
redFrequency = pulseIn(sensorOut, LOW);
// Printing the RED (R) value
Serial.print("R = ");
Serial.print(redFrequency);
delay(100);
// Setting GREEN (G) filtered photodiodes to be read
digitalWrite(S2,HIGH);
digitalWrite(S3,HIGH);
// Reading the output frequency
greenFrequency = pulseIn(sensorOut, LOW);
// Printing the GREEN (G) value
Serial.print(" G = ");
Serial.print(greenFrequency);
delay(100);
// Setting BLUE (B) filtered photodiodes to be read
digitalWrite(S2,LOW);
digitalWrite(S3,HIGH);
// Reading the output frequency
blueFrequency = pulseIn(sensorOut, LOW);
// Printing the BLUE (B) value
Serial.print(" B = ");
Serial.println(blueFrequency);
delay(100);
}
Dios te bendiga
hello, can i ask something, how to made rgb sensor color and duplicate the color to light another lamp with same color from rgb sensor ?
Programming code me error hai....