Skip to content

Commit

Permalink
Updated Doxygen documentation pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Jun 7, 2024
1 parent 596093c commit 4d2d3ac
Show file tree
Hide file tree
Showing 19 changed files with 354 additions and 89 deletions.
2 changes: 1 addition & 1 deletion docs/d0/d8a/struct___r_g_b_color.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Structure to represent RGB color values. </p>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="../../d5/dac/_t_c_s3200_8h_source.html">TCS3200.h</a></li>
<li>src/<a class="el" href="../../d5/dac/_t_c_s3200_8h_source.html">TCS3200.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
Expand Down
2 changes: 1 addition & 1 deletion docs/d4/dc0/struct___h_s_v_color.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Structure to represent HSV color values. </p>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="../../d5/dac/_t_c_s3200_8h_source.html">TCS3200.h</a></li>
<li>src/<a class="el" href="../../d5/dac/_t_c_s3200_8h_source.html">TCS3200.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
Expand Down
2 changes: 1 addition & 1 deletion docs/d4/dd1/struct___c_m_y_k_color.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Structure to represent CMYK color values. </p>
</div><hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="../../d5/dac/_t_c_s3200_8h_source.html">TCS3200.h</a></li>
<li>src/<a class="el" href="../../d5/dac/_t_c_s3200_8h_source.html">TCS3200.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
Expand Down
33 changes: 20 additions & 13 deletions docs/d5/d33/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@
<li class="level1"><a href="#autotoc_md19">Integration in the Loop</a></li>
</ul>
</div>
<div class="textblock"><p>This page contains the comprehensive list of examples and usage of TCS3200 Arduino library.</p>
<div class="textblock"><p>This page contains the comprehensive list of examples and usage of <a class="el" href="../../d5/d46/class_t_c_s3200.html" title="Class representing the TCS3200 color sensor.">TCS3200</a> Arduino library.</p>
<h1><a class="anchor" id="autotoc_md11"></a>
Setup and Initialization</h1>
<p>To use the TCS3200 Arduino Library, include the "tcs3200.h" header file and create an instance of the TCS3200 class. Use the <code>begin()</code> function to initialize the TCS3200 sensor, configure pins, and set default integration time and frequency scaling.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;tcs3200.h&quot;</span></div>
<p>To use the TCS3200 Arduino Library, include the "tcs3200.h" header file and create an instance of the <a class="el" href="../../d5/d46/class_t_c_s3200.html" title="Class representing the TCS3200 color sensor.">TCS3200</a> class. Use the <code>begin()</code> function to initialize the TCS3200 sensor, configure pins, and set default integration time and frequency scaling.</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include &quot;<a class="code" href="../../d5/dac/_t_c_s3200_8h.html">tcs3200.h</a>&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Pin assignments for S0, S1, S2, S3, and OUT pins</span></div>
<div class="line"><span class="preprocessor">#define S0_PIN 2</span></div>
Expand All @@ -127,12 +127,14 @@ <h1><a class="anchor" id="autotoc_md11"></a>
<div class="line"><span class="preprocessor">#define OUT_PIN 6</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Create an instance of TCS3200</span></div>
<div class="line">TCS3200 colorSensor(S0_PIN, S1_PIN, S2_PIN, S3_PIN, OUT_PIN);</div>
<div class="line"><a class="code hl_class" href="../../d5/d46/class_t_c_s3200.html">TCS3200</a> colorSensor(S0_PIN, S1_PIN, S2_PIN, S3_PIN, OUT_PIN);</div>
<div class="line"> </div>
<div class="line"><span class="keywordtype">void</span> setup() {</div>
<div class="line"> <span class="comment">// Initialize the sensor</span></div>
<div class="line"> colorSensor.begin();</div>
<div class="line">}</div>
<div class="ttc" id="a_t_c_s3200_8h_html"><div class="ttname"><a href="../../d5/dac/_t_c_s3200_8h.html">TCS3200.h</a></div><div class="ttdoc">TCS3200 Color Sensor Arduino Library</div></div>
<div class="ttc" id="aclass_t_c_s3200_html"><div class="ttname"><a href="../../d5/d46/class_t_c_s3200.html">TCS3200</a></div><div class="ttdoc">Class representing the TCS3200 color sensor.</div><div class="ttdef"><b>Definition</b> TCS3200.h:219</div></div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md12"></a>
Calibration</h1>
<p>The TCS3200 sensor requires calibration for accurate color sensing. Calibration involves capturing readings for both the lightest and darkest colors to establish the range for color intensity mapping. Use the <code>calibrate()</code> function to enable calibration mode, and after invoking <code>calibrate_light()</code> and <code>calibrate_dark()</code> functions to calibrate the sensor with white and black reference colors, respectively.</p>
Expand Down Expand Up @@ -161,8 +163,9 @@ <h1><a class="anchor" id="autotoc_md11"></a>
<div class="line"> uint8_t clearIntensity = colorSensor.read_clear();</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Or read RGB color intensity values as an RGBColor structure</span></div>
<div class="line"> RGBColor color = colorSensor.read_rgb_color();</div>
<div class="line"> <a class="code hl_struct" href="../../d0/d8a/struct___r_g_b_color.html">RGBColor</a> color = colorSensor.read_rgb_color();</div>
<div class="line">}</div>
<div class="ttc" id="astruct___r_g_b_color_html"><div class="ttname"><a href="../../d0/d8a/struct___r_g_b_color.html">_RGBColor</a></div><div class="ttdoc">Structure to represent RGB color values.</div><div class="ttdef"><b>Definition</b> TCS3200.h:167</div></div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md14"></a>
Integration Time and Frequency Scaling</h1>
<p>The library provides control over the integration time and frequency scaling of the TCS3200 sensor. Integration time is set using the <code>integration_time()</code> function, and frequency scaling is set using the <code>frequency_scaling()</code> function. Integration time affects the accuracy and sensitivity of color measurements, while frequency scaling optimizes the trade-off between accuracy and response time.</p>
Expand All @@ -174,8 +177,9 @@ <h1><a class="anchor" id="autotoc_md11"></a>
<div class="line"> colorSensor.integration_time(2500);</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Set frequency scaling to 20%</span></div>
<div class="line"> colorSensor.frequency_scaling(TCS3200_OFREQ_20P);</div>
<div class="line"> colorSensor.frequency_scaling(<a class="code hl_define" href="../../d5/dac/_t_c_s3200_8h.html#a7c17ec4eb2e59a7c01f8ec0c1ac5656e">TCS3200_OFREQ_20P</a>);</div>
<div class="line">}</div>
<div class="ttc" id="a_t_c_s3200_8h_html_a7c17ec4eb2e59a7c01f8ec0c1ac5656e"><div class="ttname"><a href="../../d5/dac/_t_c_s3200_8h.html#a7c17ec4eb2e59a7c01f8ec0c1ac5656e">TCS3200_OFREQ_20P</a></div><div class="ttdeci">#define TCS3200_OFREQ_20P</div><div class="ttdoc">20% frequency scaling</div><div class="ttdef"><b>Definition</b> TCS3200.h:159</div></div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md15"></a>
White Balancing</h1>
<p>White balancing is essential for achieving accurate color measurements. It allows users to calibrate the sensor based on a known white reference color. Use the <code>white_balance()</code> function to set the white balance with an RGBColor structure, and <code>white_balance()</code> to retrieve the current white balance settings.</p>
Expand All @@ -184,22 +188,25 @@ <h1><a class="anchor" id="autotoc_md11"></a>
<div class="line"> colorSensor.begin();</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Perform white balancing with a known white reference color (255, 255, 255)</span></div>
<div class="line"> RGBColor whiteReference = {255, 255, 255};</div>
<div class="line"> <a class="code hl_struct" href="../../d0/d8a/struct___r_g_b_color.html">RGBColor</a> whiteReference = {255, 255, 255};</div>
<div class="line"> colorSensor.white_balance(whiteReference);</div>
<div class="line">}</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md16"></a>
Color Space Conversions</h1>
<p>The TCS3200 library supports color space conversions from RGB to other color spaces, including HSV, CMYK, and CIE 1931 XYZ. Use the corresponding functions (<code>read_hsv()</code>, <code>read_cmyk()</code>, and <code>read_cie1931()</code>) to obtain color representations in the desired color space.</p>
<div class="fragment"><div class="line"><span class="keywordtype">void</span> loop() {</div>
<div class="line"> <span class="comment">// Read color in HSV color space</span></div>
<div class="line"> HSVColor hsvColor = colorSensor.read_hsv();</div>
<div class="line"> <a class="code hl_struct" href="../../d4/dc0/struct___h_s_v_color.html">HSVColor</a> hsvColor = colorSensor.read_hsv();</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Read color in CMYK color space</span></div>
<div class="line"> CMYKColor cmykColor = colorSensor.read_cmyk();</div>
<div class="line"> <a class="code hl_struct" href="../../d4/dd1/struct___c_m_y_k_color.html">CMYKColor</a> cmykColor = colorSensor.read_cmyk();</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Read color in CIE 1931 XYZ color space</span></div>
<div class="line"> CIE1931Color cie1931Color = colorSensor.read_cie1931();</div>
<div class="line"> <a class="code hl_struct" href="../../dc/d69/struct___c_i_e1931.html">CIE1931Color</a> cie1931Color = colorSensor.read_cie1931();</div>
<div class="line">}</div>
<div class="ttc" id="astruct___c_i_e1931_html"><div class="ttname"><a href="../../dc/d69/struct___c_i_e1931.html">_CIE1931</a></div><div class="ttdoc">Structure to represent CIE 1931 XYZ color values.</div><div class="ttdef"><b>Definition</b> TCS3200.h:201</div></div>
<div class="ttc" id="astruct___c_m_y_k_color_html"><div class="ttname"><a href="../../d4/dd1/struct___c_m_y_k_color.html">_CMYKColor</a></div><div class="ttdoc">Structure to represent CMYK color values.</div><div class="ttdef"><b>Definition</b> TCS3200.h:189</div></div>
<div class="ttc" id="astruct___h_s_v_color_html"><div class="ttname"><a href="../../d4/dc0/struct___h_s_v_color.html">_HSVColor</a></div><div class="ttdoc">Structure to represent HSV color values.</div><div class="ttdef"><b>Definition</b> TCS3200.h:178</div></div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md17"></a>
Nearest Color Detection</h1>
<p>The library provides a template function <code>nearest_color()</code> that allows users to find the nearest color label based on the current sensor readings. This is useful for applications like color classification and sorting.</p>
Expand All @@ -209,7 +216,7 @@ <h1><a class="anchor" id="autotoc_md11"></a>
<div class="line"> </div>
<div class="line"> <span class="comment">// Color labels and corresponding RGBColor values</span></div>
<div class="line"> String colorLabels[] = {<span class="stringliteral">&quot;Red&quot;</span>, <span class="stringliteral">&quot;Green&quot;</span>, <span class="stringliteral">&quot;Blue&quot;</span>, <span class="stringliteral">&quot;Yellow&quot;</span>, <span class="stringliteral">&quot;Orange&quot;</span>};</div>
<div class="line"> RGBColor colorValues[] = {</div>
<div class="line"> <a class="code hl_struct" href="../../d0/d8a/struct___r_g_b_color.html">RGBColor</a> colorValues[] = {</div>
<div class="line"> {255, 0, 0},</div>
<div class="line"> {0, 255, 0},</div>
<div class="line"> {0, 0, 255},</div>
Expand Down Expand Up @@ -237,8 +244,8 @@ <h1><a class="anchor" id="autotoc_md11"></a>
<div class="line"> colorSensor.begin();</div>
<div class="line"> </div>
<div class="line"> <span class="comment">// Set interrupt callbacks with upper and lower color thresholds</span></div>
<div class="line"> RGBColor upperThreshold = {200, 200, 200};</div>
<div class="line"> RGBColor lowerThreshold = {100, 100, 100};</div>
<div class="line"> <a class="code hl_struct" href="../../d0/d8a/struct___r_g_b_color.html">RGBColor</a> upperThreshold = {200, 200, 200};</div>
<div class="line"> <a class="code hl_struct" href="../../d0/d8a/struct___r_g_b_color.html">RGBColor</a> lowerThreshold = {100, 100, 100};</div>
<div class="line"> </div>
<div class="line"> colorSensor.upper_bound_interrupt(upperThreshold, upperThresholdExceeded);</div>
<div class="line"> colorSensor.lower_bound_interrupt(lowerThreshold, lowerThresholdExceeded);</div>
Expand Down
5 changes: 3 additions & 2 deletions docs/d5/d46/class_t_c_s3200.html
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,9 @@ <h2 class="memtitle"><span class="permalink"><a href="#aa6d7d1e5a53aec439169cd96

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="../../d5/dac/_t_c_s3200_8h_source.html">TCS3200.h</a></li>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/<a class="el" href="../../d5/dac/_t_c_s3200_8h_source.html">TCS3200.h</a></li>
<li>src/TCS3200.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
Expand Down
2 changes: 1 addition & 1 deletion docs/d5/dac/_t_c_s3200_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.7"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TCS3200 Arduino Library: TCS3200.h File Reference</title>
<title>TCS3200 Arduino Library: src/TCS3200.h File Reference</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
Expand Down
Loading

0 comments on commit 4d2d3ac

Please sign in to comment.