Download Print this page

Advertisement

Quick Links

3
TCS3200 Color Sensor
Ausgabe 18.08.2017
Copyright by Joy-IT
1

Advertisement

loading
Need help?

Need help?

Do you have a question about the TCS3200 and is the answer not in the manual?

Questions and answers

Summary of Contents for Joy-it TCS3200

  • Page 1 TCS3200 Color Sensor Ausgabe 18.08.2017 Copyright by Joy-IT...
  • Page 2 TCS3200 Color Sensor Index Connecting the sensor Installing the library Usage & example code Support Ausgabe 18.08.2017 Copyright by Joy-IT...
  • Page 3: Connecting The Sensor

    TCS3200 Color Sensor Dear customer, thank you for purchasing our product. Please note our following instructions: Connecting the sensor Connect the color sensor, as seen in the following image, to the pins of your Arduino. The two pins LED and GND, which are next to each other, need to be wired to each other with a jumper or a cable.
  • Page 4: Installing The Library

    TCS3200 Color Sensor 2. Installing the library Before you can transfer the code to your Arduino, you need to add the Bevor Sie den entsprechen Quellcode auf Ihren Arduino übertragen, muss zunächst die TimerOne Bibliothek hinzugefügt werden. Dazu klicken Sie bitte, wie im Bild zu sehen, auf Sketch —> Bibliothek einbinden —> Bibliotheken verwalten.
  • Page 5 TCS3200 Color Sensor 2. Installing the library Before you can transfer the code to your Arduino, you need to add the TimerOne library to your Arduino libraries. Therefore, click on Sketch -> Include Libary -> Manage Libraries. Ausgabe 18.08.2017 Copyright by Joy-IT...
  • Page 6 TCS3200 Color Sensor In the now opening libary manager you need to search for the TimerOne libary. Install the library. Ausgabe 18.08.2017 Copyright by Joy-IT...
  • Page 7 TCS3200 Color Sensor Usage & example code Below you can see a code example for the color sensor. Please copy the complete code to your Arduino. #include <TimerOne.h> #define S0 #define S1 #define S2 #define S3 #define OUT g_count g_array[3];...
  • Page 8 TCS3200 Color Sensor void TSC_Count() g_count void TSC_Callback() switch(g_flag) case Serial.println("->WB Start"); TSC_WB(LOW, LOW); //Filter without red break; case Serial.print("->Frequency R="); Serial.println(g_count); g_array[0] g_count; TSC_WB(HIGH, HIGH); //Filter without green break; case Serial.print("->Frequency G="); Serial.println(g_count); g_array[1] g_count; TSC_WB(LOW, HIGH); //Filter without blue break;...
  • Page 9 TCS3200 Color Sensor void TSC_WB(int Level0, Level1) //White balance g_count g_flag ++; TSC_FilterColor(Level0, Level1); Timer1.setPeriod(1000000); void setup() TSC_Init(); Serial.begin(9600); Timer1.initialize(); Timer1.attachInterrupt(TSC_Callback); attachInterrupt(0, TSC_Count, RISING); delay(4000); for(int i=0; i<3; i++) Serial.println(g_array[i]); g_SF[0] = 255.0/ g_array[0]; //R-Value g_SF[1] = 255.0/ g_array[1] ;...
  • Page 10 TCS3200 Color Sensor Support We also support you after your purchase. If there are any questions left or if you encounter any problems, feel free to contact us by mail, phone or by our ticket-supportsystem on our website. E-Mail: service@joy-it.net Ticket-System: http://support.joy-it.net...