{"id":52370,"date":"2026-11-01T10:51:02","date_gmt":"2026-11-01T10:51:02","guid":{"rendered":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/"},"modified":"2026-11-01T10:51:02","modified_gmt":"2026-11-01T10:51:02","slug":"tcs3200-colour-sensor","status":"publish","type":"siratek_tutorial","link":"https:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/","title":{"rendered":"Reading Colour with a TCS3200"},"content":{"rendered":"<body><p><\/p>\n<h2>What it does<\/h2>\n<p>An array of tiny light sensors behind coloured filters, with four white LEDs around them to illuminate whatever you point it at. Select a filter, and the chip outputs a square wave whose <strong>frequency<\/strong> is proportional to how much light of that colour it sees.<\/p>\n<p>So reading a colour means: select red, measure the frequency, select green, measure, select blue, measure. Three numbers, and their ratios tell you the colour.<\/p>\n<p>It is the only sensor in this library that reports by frequency rather than voltage, and the only one where the answer depends as much on your calibration as on the hardware.<\/p>\n<h2>Before you begin<\/h2>\n<h3>Required parts and tools<\/h3>\n<ul>\n<li>An Arduino Uno or compatible board.<\/li>\n<li>One TCS3200 colour sensor module. This is Siratek product 2874, the red <code>YL-64<\/code> board.<\/li>\n<li>Eight jumper wires.<\/li>\n<li>Something to make a hood from: black card, tape, or a 3D print.<\/li>\n<li>Samples of the colours you want to recognise, plus white and black references.<\/li>\n<\/ul>\n<h3>Eight pins<\/h3>\n<p>The board\u2019s header is labelled:<\/p>\n<p><strong><code>VCC<\/code>  <code>GND<\/code>  <code>S0<\/code>  <code>S1<\/code>  <code>S2<\/code>  <code>S3<\/code>  <code>EO<\/code>  <code>OUT<\/code><\/strong><\/p>\n<ul>\n<li><strong><code>S0<\/code> and <code>S1<\/code><\/strong> scale the output frequency: 100 percent, 20 percent, 2 percent, or power down.<\/li>\n<li><strong><code>S2<\/code> and <code>S3<\/code><\/strong> select the filter: red, green, blue or clear.<\/li>\n<li><strong><code>EO<\/code><\/strong> is output enable, active low. Tie it to <code>GND<\/code>.<\/li>\n<li><strong><code>OUT<\/code><\/strong> is the square wave.<\/li>\n<\/ul>\n<p>Two selection tables, and they are worth having in front of you:<\/p>\n<table>\n<thead>\n<tr>\n<th><code>S0<\/code><\/th>\n<th><code>S1<\/code><\/th>\n<th>Output scaling<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>LOW<\/td>\n<td>LOW<\/td>\n<td>Power down<\/td>\n<\/tr>\n<tr>\n<td>LOW<\/td>\n<td>HIGH<\/td>\n<td>2 %<\/td>\n<\/tr>\n<tr>\n<td>HIGH<\/td>\n<td>LOW<\/td>\n<td>20 %<\/td>\n<\/tr>\n<tr>\n<td>HIGH<\/td>\n<td>HIGH<\/td>\n<td>100 %<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table>\n<thead>\n<tr>\n<th><code>S2<\/code><\/th>\n<th><code>S3<\/code><\/th>\n<th>Filter<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>LOW<\/td>\n<td>LOW<\/td>\n<td>Red<\/td>\n<\/tr>\n<tr>\n<td>LOW<\/td>\n<td>HIGH<\/td>\n<td>Blue<\/td>\n<\/tr>\n<tr>\n<td>HIGH<\/td>\n<td>LOW<\/td>\n<td>Clear, no filter<\/td>\n<\/tr>\n<tr>\n<td>HIGH<\/td>\n<td>HIGH<\/td>\n<td>Green<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Note that blue and clear are <strong>not<\/strong> in the order you would guess. Getting <code>S2<\/code> and <code>S3<\/code> the wrong way round gives readings that look plausible and are wrong, which is worse than an obvious failure.<\/p>\n<p><strong>Use 20 percent scaling<\/strong> on an Uno. At 100 percent the frequency can exceed what <code>pulseIn()<\/code> measures comfortably; at 2 percent each reading takes too long.<\/p>\n<h3>Measuring a frequency with pulseIn<\/h3>\n<p><code>pulseIn()<\/code> measures how long a pulse lasts, in microseconds. A shorter pulse means a higher frequency means more light.<\/p>\n<p>So the number you get is <strong>inversely related to brightness<\/strong>: bright red gives a small number on the red filter, not a large one. That inversion catches everyone once.<\/p>\n<p>A proper frequency counter using interrupts is faster and more accurate. <code>pulseIn()<\/code> is simpler, needs no timers, and is accurate enough once calibrated, which is why it is used here.<\/p>\n<h3>Calibration is not optional<\/h3>\n<p>The raw numbers depend on the LEDs, the distance, the ambient light and the sample\u2019s texture. There is no absolute scale.<\/p>\n<p>What works is two references:<\/p>\n<ul>\n<li><strong>White<\/strong>, which gives the smallest numbers the sensor will produce in your setup.<\/li>\n<li><strong>Black<\/strong>, which gives the largest.<\/li>\n<\/ul>\n<p>Everything else falls between, and <code>map()<\/code> turns a raw reading into 0 to 255 for each channel. Those three values are comparable across readings, which the raw ones are not.<\/p>\n<p><strong>Recalibrate whenever anything changes<\/strong>: the distance, the hood, the room lighting, or the sensor\u2019s mounting.<\/p>\n<h3>The hood, which matters more than the code<\/h3>\n<p>Ambient light reaches the sensor and corrupts every reading. Sunlight through a window will change your results between morning and afternoon.<\/p>\n<p>Build a shade so the only light the sensor sees is its own LEDs reflecting off the sample. Black card taped into a short tube is enough. Hold the sample at a <strong>fixed distance<\/strong>, about a centimetre, because the reading changes sharply with distance.<\/p>\n<p>A sensor in free air gives numbers that wander and will not classify anything reliably. A sensor in a hood at a fixed distance is genuinely useful. The difference is cardboard, not code.<\/p>\n<h3>What it can and cannot do<\/h3>\n<p>It can tell red from green from blue from yellow, reliably, on matte samples at a fixed distance in a hood.<\/p>\n<p>It cannot match paint shades, read glossy or metallic surfaces well, or work at a distance. It is a colour <strong>sorter<\/strong>, not a colorimeter.<\/p>\n<h2>Pin reference<\/h2>\n<table>\n<thead>\n<tr>\n<th>Module pin<\/th>\n<th>Connect to<\/th>\n<th>Purpose<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>VCC<\/code><\/td>\n<td>Uno <code>5V<\/code><\/td>\n<td>Power and the four LEDs<\/td>\n<\/tr>\n<tr>\n<td><code>GND<\/code><\/td>\n<td>Uno <code>GND<\/code><\/td>\n<td>Ground<\/td>\n<\/tr>\n<tr>\n<td><code>S0<\/code><\/td>\n<td>Uno <code>D4<\/code><\/td>\n<td>Frequency scaling<\/td>\n<\/tr>\n<tr>\n<td><code>S1<\/code><\/td>\n<td>Uno <code>D5<\/code><\/td>\n<td>Frequency scaling<\/td>\n<\/tr>\n<tr>\n<td><code>S2<\/code><\/td>\n<td>Uno <code>D6<\/code><\/td>\n<td>Filter select<\/td>\n<\/tr>\n<tr>\n<td><code>S3<\/code><\/td>\n<td>Uno <code>D7<\/code><\/td>\n<td>Filter select<\/td>\n<\/tr>\n<tr>\n<td><code>EO<\/code><\/td>\n<td>Uno <code>GND<\/code><\/td>\n<td>Output enable, active low<\/td>\n<\/tr>\n<tr>\n<td><code>OUT<\/code><\/td>\n<td>Uno <code>D8<\/code><\/td>\n<td>Frequency output<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<figure class=\"siratek-tutorial-figure\"><img decoding=\"async\" src=\"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/tcs3200-colour-sensor-wiring.svg\" alt=\"A TCS3200 colour sensor module with eight pins wired to an Uno, showing the four white LEDs and a card hood keeping ambient light out\" loading=\"lazy\"><figcaption>Eight pins, and a cardboard hood that matters more than any of them.<\/figcaption><\/figure>\n<h2>Wiring steps<\/h2>\n<ol>\n<li>Unplug the USB cable.<\/li>\n<li><code>GND<\/code> to <code>GND<\/code>, <code>VCC<\/code> to <code>5V<\/code>.<\/li>\n<li><code>EO<\/code> to <code>GND<\/code>.<\/li>\n<li><code>S0<\/code> to <code>D4<\/code>, <code>S1<\/code> to <code>D5<\/code>, <code>S2<\/code> to <code>D6<\/code>, <code>S3<\/code> to <code>D7<\/code>.<\/li>\n<li><code>OUT<\/code> to <code>D8<\/code>.<\/li>\n<li>Plug the USB cable back in. The four white LEDs should light at once.<\/li>\n<li>Build the hood before taking any reading seriously.<\/li>\n<\/ol>\n<h2>Software and libraries<\/h2>\n<p>No library is required. <code>pulseIn()<\/code> is part of the Arduino core.<\/p>\n<h2>Minimal working example<\/h2>\n<pre><code>\/\/ Siratek: raw readings for each filter. Smaller means more of that colour.\n\nconst int s0 = 4, s1 = 5, s2 = 6, s3 = 7, out = 8;\n\nint readFilter(bool a, bool b) {\n  digitalWrite(s2, a);\n  digitalWrite(s3, b);\n  delay(60);                      \/\/ let the photodiodes settle\n  return pulseIn(out, LOW);\n}\n\nvoid setup() {\n  pinMode(s0, OUTPUT);\n  pinMode(s1, OUTPUT);\n  pinMode(s2, OUTPUT);\n  pinMode(s3, OUTPUT);\n  pinMode(out, INPUT);\n\n  \/\/ 20 % scaling: HIGH, LOW.\n  digitalWrite(s0, HIGH);\n  digitalWrite(s1, LOW);\n\n  Serial.begin(9600);\n  Serial.println(\"Siratek: hold white, then black, and write both sets down.\");\n}\n\nvoid loop() {\n  int red   = readFilter(LOW, LOW);\n  int blue  = readFilter(LOW, HIGH);\n  int green = readFilter(HIGH, HIGH);\n\n  Serial.print(\"R \");  Serial.print(red);\n  Serial.print(\"   G \"); Serial.print(green);\n  Serial.print(\"   B \"); Serial.println(blue);\n\n  delay(400);\n}<\/code><\/pre>\n<p>Hold a white card at your chosen distance and write down the three numbers. Then a black one. Those six values are your calibration, and nothing works without them.<\/p>\n<p>Check the direction while you are there: white should give <strong>smaller<\/strong> numbers than black on all three channels. If it does not, <code>EO<\/code> is probably not grounded.<\/p>\n<h3>Calibrated channels<\/h3>\n<pre><code>\/\/ Siratek: raw readings turned into comparable 0 to 255 values.\n\nconst int s0 = 4, s1 = 5, s2 = 6, s3 = 7, out = 8;\n\n\/\/ From the sketch above. Yours will differ, and so will mine tomorrow.\nconst int whiteR = 22, whiteG = 24, whiteB = 20;\nconst int blackR = 95, blackG = 102, blackB = 88;\n\nint readFilter(bool a, bool b) {\n  digitalWrite(s2, a);\n  digitalWrite(s3, b);\n  delay(60);\n  return pulseIn(out, LOW);\n}\n\nint scaled(int raw, int white, int black) {\n  int value = map(raw, white, black, 255, 0);\n  return constrain(value, 0, 255);\n}\n\nvoid setup() {\n  pinMode(s0, OUTPUT); pinMode(s1, OUTPUT);\n  pinMode(s2, OUTPUT); pinMode(s3, OUTPUT);\n  pinMode(out, INPUT);\n  digitalWrite(s0, HIGH);\n  digitalWrite(s1, LOW);\n  Serial.begin(9600);\n}\n\nvoid loop() {\n  int r = scaled(readFilter(LOW, LOW), whiteR, blackR);\n  int g = scaled(readFilter(HIGH, HIGH), whiteG, blackG);\n  int b = scaled(readFilter(LOW, HIGH), whiteB, blackB);\n\n  Serial.print(\"R \"); Serial.print(r);\n  Serial.print(\"  G \"); Serial.print(g);\n  Serial.print(\"  B \"); Serial.println(b);\n\n  delay(400);\n}<\/code><\/pre>\n<p><code>map()<\/code> runs from white to black and 255 down to 0, which inverts the relationship so that a bigger number means more of that colour. <code>constrain()<\/code> catches samples brighter than your white reference, which otherwise produce values over 255.<\/p>\n<h3>Naming a colour<\/h3>\n<pre><code>\/\/ Siratek: classify by which channel dominates.\n\nconst char* nameColour(int r, int g, int b) {\n  int total = r + g + b;\n\n  if (total &lt; 120) {\n    return \"black or very dark\";\n  }\n  if (r &gt; 190 &amp;&amp; g &gt; 190 &amp;&amp; b &gt; 190) {\n    return \"white\";\n  }\n\n  if (r &gt; g + 40 &amp;&amp; r &gt; b + 40) {\n    return \"red\";\n  }\n  if (g &gt; r + 40 &amp;&amp; g &gt; b + 40) {\n    return \"green\";\n  }\n  if (b &gt; r + 40 &amp;&amp; b &gt; g + 40) {\n    return \"blue\";\n  }\n  if (r &gt; b + 50 &amp;&amp; g &gt; b + 50) {\n    return \"yellow\";\n  }\n\n  return \"not sure\";\n}<\/code><\/pre>\n<p>Two things make this honest.<\/p>\n<p><strong>It returns \u201cnot sure\u201d.<\/strong> A classifier that always answers is a classifier that is often wrong, and in a sorting machine a confident wrong answer is worse than an admission.<\/p>\n<p><strong>The margins are generous.<\/strong> Forty counts between channels, not five. Tighten them and the sensor starts flipping between answers on the same sample, which is how you discover the readings are noisier than they looked.<\/p>\n<p>Both the thresholds and the margins need adjusting against your own samples. Print the three values alongside the name while you tune them.<\/p>\n<h2>Expected result<\/h2>\n<p>In a hood at a fixed distance, a white card giving three roughly equal high values, a black one giving three low values, and a red sample giving a clearly dominant red channel.<\/p>\n<p>Repeat a reading on the same sample five times. The three values should agree to within a few counts. If they wander by tens, light is leaking in or the distance is changing.<\/p>\n<h2>Troubleshooting<\/h2>\n<table>\n<thead>\n<tr>\n<th>Symptom<\/th>\n<th>Likely cause<\/th>\n<th>Check or fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>pulseIn()<\/code> returns 0<\/td>\n<td><code>EO<\/code> not grounded, or <code>OUT<\/code> on the wrong pin<\/td>\n<td>Check both<\/td>\n<\/tr>\n<tr>\n<td>All three channels identical<\/td>\n<td><code>S2<\/code> and <code>S3<\/code> not switching<\/td>\n<td>Check those two wires<\/td>\n<\/tr>\n<tr>\n<td>Blue and clear behave oddly<\/td>\n<td>Filter table order<\/td>\n<td>Blue is LOW HIGH, clear is HIGH LOW<\/td>\n<\/tr>\n<tr>\n<td>White reads higher than black<\/td>\n<td>Reading direction<\/td>\n<td>Shorter pulse means more light<\/td>\n<\/tr>\n<tr>\n<td>Readings change through the day<\/td>\n<td>Ambient light<\/td>\n<td>Build the hood<\/td>\n<\/tr>\n<tr>\n<td>Readings change with distance<\/td>\n<td>Expected<\/td>\n<td>Fix the distance mechanically<\/td>\n<\/tr>\n<tr>\n<td>Values over 255<\/td>\n<td>Sample brighter than the white reference<\/td>\n<td><code>constrain()<\/code>, then recalibrate<\/td>\n<\/tr>\n<tr>\n<td>Classifier flips on one sample<\/td>\n<td>Margins too tight<\/td>\n<td>Widen them; print the raw values<\/td>\n<\/tr>\n<tr>\n<td>Glossy samples read wrongly<\/td>\n<td>Specular reflection<\/td>\n<td>Matte samples only<\/td>\n<\/tr>\n<tr>\n<td>Readings slow<\/td>\n<td>60 ms settle per channel<\/td>\n<td>Three channels means about 200 ms<\/td>\n<\/tr>\n<tr>\n<td>Numbers very large at 100 % scaling<\/td>\n<td><code>pulseIn()<\/code> out of its comfortable range<\/td>\n<td>Use 20 %: <code>S0<\/code> HIGH, <code>S1<\/code> LOW<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Next steps<\/h2>\n<ul>\n<li><strong>Easier first:<\/strong> <em>Measuring Light with an LDR<\/em>, for light without colour.<\/li>\n<li><strong>Related products:<\/strong> an SG90 servo to sort what you have identified, and an LCD to name it.<\/li>\n<li><strong>Next project:<\/strong> a colour sorter that drops counters into bins, which is this sensor, a servo and a lot of patient calibration.<\/li>\n<\/ul>\n<h2>Sources and attribution<\/h2>\n<p>All text, wiring guidance and code in this tutorial are original Siratek work.<\/p>\n<ul>\n<li>TCS3200 datasheet for the <code>S0<\/code> to <code>S3<\/code> selection tables, the output scaling options and the frequency output behaviour.<\/li>\n<li>The <code>YL-64<\/code> board marking, the eight-pin <code>VCC GND S0 S1 S2 S3 EO OUT<\/code> header and the four white LEDs were read from the Siratek product photographs for item 2874.<\/li>\n<\/ul>\n<p>All calibration values in this tutorial are illustrative and must be measured by the reader, since they depend on the LEDs, the distance, the hood and the ambient light. No third-party tutorial text, diagrams, photographs or code has been reproduced here.<\/p>\n<p><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>An array of tiny light sensors behind coloured filters, with four white LEDs around them to illuminate whatever you point it at. Select a filter, and the chip outputs a square wave whose frequency is proportional to how much light&#8230;<\/p>\n","protected":false},"featured_media":0,"template":"","siratek_tutorial_level":[],"class_list":["post-52370","siratek_tutorial","type-siratek_tutorial","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Reading Colour with a TCS3200 - siratek<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reading Colour with a TCS3200 - siratek\" \/>\n<meta property=\"og:description\" content=\"An array of tiny light sensors behind coloured filters, with four white LEDs around them to illuminate whatever you point it at. Select a filter, and the chip outputs a square wave whose frequency is proportional to how much light...\" \/>\n<meta property=\"og:url\" content=\"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/\" \/>\n<meta property=\"og:site_name\" content=\"siratek\" \/>\n<meta property=\"og:image\" content=\"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/tcs3200-colour-sensor-wiring.svg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/tcs3200-colour-sensor\\\/\",\"url\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/tcs3200-colour-sensor\\\/\",\"name\":\"Reading Colour with a TCS3200 - siratek\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/siratek.net\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/tcs3200-colour-sensor\\\/#primaryimage\"},\"image\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/tcs3200-colour-sensor\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/tcs3200-colour-sensor-wiring.svg\",\"datePublished\":\"2026-11-01T10:51:02+00:00\",\"breadcrumb\":{\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/tcs3200-colour-sensor\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/tcs3200-colour-sensor\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/tcs3200-colour-sensor\\\/#primaryimage\",\"url\":\"https:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/tcs3200-colour-sensor-wiring.svg\",\"contentUrl\":\"https:\\\/\\\/siratek.net\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/tcs3200-colour-sensor-wiring.svg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/tcs3200-colour-sensor\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/siratek.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Tutorials\",\"item\":\"https:\\\/\\\/siratek.net\\\/index.php\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Reading Colour with a TCS3200\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/siratek.net\\\/#website\",\"url\":\"https:\\\/\\\/siratek.net\\\/\",\"name\":\"siratek\",\"description\":\"Your Best Electronic Retail Shop\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/siratek.net\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reading Colour with a TCS3200 - siratek","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/","og_locale":"en_US","og_type":"article","og_title":"Reading Colour with a TCS3200 - siratek","og_description":"An array of tiny light sensors behind coloured filters, with four white LEDs around them to illuminate whatever you point it at. Select a filter, and the chip outputs a square wave whose frequency is proportional to how much light...","og_url":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/","og_site_name":"siratek","og_image":[{"url":"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/tcs3200-colour-sensor-wiring.svg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/","url":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/","name":"Reading Colour with a TCS3200 - siratek","isPartOf":{"@id":"https:\/\/siratek.net\/#website"},"primaryImageOfPage":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/#primaryimage"},"image":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/#primaryimage"},"thumbnailUrl":"http:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/tcs3200-colour-sensor-wiring.svg","datePublished":"2026-11-01T10:51:02+00:00","breadcrumb":{"@id":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/#primaryimage","url":"https:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/tcs3200-colour-sensor-wiring.svg","contentUrl":"https:\/\/siratek.net\/wp-content\/uploads\/2026\/11\/tcs3200-colour-sensor-wiring.svg"},{"@type":"BreadcrumbList","@id":"http:\/\/siratek.net\/index.php\/tutorials\/tcs3200-colour-sensor\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/siratek.net\/"},{"@type":"ListItem","position":2,"name":"Tutorials","item":"https:\/\/siratek.net\/index.php\/tutorials\/"},{"@type":"ListItem","position":3,"name":"Reading Colour with a TCS3200"}]},{"@type":"WebSite","@id":"https:\/\/siratek.net\/#website","url":"https:\/\/siratek.net\/","name":"siratek","description":"Your Best Electronic Retail Shop","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/siratek.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial\/52370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial"}],"about":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/types\/siratek_tutorial"}],"version-history":[{"count":0,"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial\/52370\/revisions"}],"wp:attachment":[{"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/media?parent=52370"}],"wp:term":[{"taxonomy":"siratek_tutorial_level","embeddable":true,"href":"https:\/\/siratek.net\/index.php\/wp-json\/wp\/v2\/siratek_tutorial_level?post=52370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}