mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
Update docs
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.6"/>
|
||||
<title>ArduinoLibs: Charlieplex Class Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
@@ -29,7 +30,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.1.2 -->
|
||||
<!-- Generated by Doxygen 1.8.6 -->
|
||||
<script type="text/javascript">
|
||||
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</script>
|
||||
@@ -95,33 +96,44 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
|
||||
<p><code>#include <<a class="el" href="Charlieplex_8h_source.html">Charlieplex.h</a>></code></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
||||
Public Member Functions</h2></td></tr>
|
||||
<tr class="memitem:abfb0d0456bcbadbf60c21f615adacdbd"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#abfb0d0456bcbadbf60c21f615adacdbd">Charlieplex</a> (const uint8_t *pins, uint8_t numPins)</td></tr>
|
||||
<tr class="memdesc:abfb0d0456bcbadbf60c21f615adacdbd"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new charliexplexing array where the output pins are specified by the <em>numPins</em> entries in <em>pins</em>. <a href="#abfb0d0456bcbadbf60c21f615adacdbd"></a><br/></td></tr>
|
||||
<tr class="memdesc:abfb0d0456bcbadbf60c21f615adacdbd"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new charliexplexing array where the output pins are specified by the <em>numPins</em> entries in <em>pins</em>. <a href="#abfb0d0456bcbadbf60c21f615adacdbd">More...</a><br/></td></tr>
|
||||
<tr class="separator:abfb0d0456bcbadbf60c21f615adacdbd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a4dbe37ccba8ba18139f4e710afdcd103"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4dbe37ccba8ba18139f4e710afdcd103"></a>
|
||||
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#a4dbe37ccba8ba18139f4e710afdcd103">~Charlieplex</a> ()</td></tr>
|
||||
<tr class="memdesc:a4dbe37ccba8ba18139f4e710afdcd103"><td class="mdescLeft"> </td><td class="mdescRight">Destroys this charlieplexed array. <br/></td></tr>
|
||||
<tr class="separator:a4dbe37ccba8ba18139f4e710afdcd103"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a5008aa4143d381ce34a3aed1a3843e4e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#a5008aa4143d381ce34a3aed1a3843e4e">count</a> () const </td></tr>
|
||||
<tr class="memdesc:a5008aa4143d381ce34a3aed1a3843e4e"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of LED's in this charlieplexed array based on the number of pins. <a href="#a5008aa4143d381ce34a3aed1a3843e4e"></a><br/></td></tr>
|
||||
<tr class="memdesc:a5008aa4143d381ce34a3aed1a3843e4e"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of LED's in this charlieplexed array based on the number of pins. <a href="#a5008aa4143d381ce34a3aed1a3843e4e">More...</a><br/></td></tr>
|
||||
<tr class="separator:a5008aa4143d381ce34a3aed1a3843e4e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a90fd09f24b62424b0b7b8bcdb0140b9d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d">led</a> (int index) const </td></tr>
|
||||
<tr class="memdesc:a90fd09f24b62424b0b7b8bcdb0140b9d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the value of the LED at <em>index</em> in the charplexed array; true if lit; false if not lit. <a href="#a90fd09f24b62424b0b7b8bcdb0140b9d"></a><br/></td></tr>
|
||||
<tr class="memdesc:a90fd09f24b62424b0b7b8bcdb0140b9d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the value of the LED at <em>index</em> in the charplexed array; true if lit; false if not lit. <a href="#a90fd09f24b62424b0b7b8bcdb0140b9d">More...</a><br/></td></tr>
|
||||
<tr class="separator:a90fd09f24b62424b0b7b8bcdb0140b9d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ab103c9687a0890faf72e4da79e3de0a5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5">setLed</a> (int index, bool value)</td></tr>
|
||||
<tr class="memdesc:ab103c9687a0890faf72e4da79e3de0a5"><td class="mdescLeft"> </td><td class="mdescRight">Sets the <em>value</em> of the LED at <em>index</em> in the charliplexed array. <a href="#ab103c9687a0890faf72e4da79e3de0a5"></a><br/></td></tr>
|
||||
<tr class="memdesc:ab103c9687a0890faf72e4da79e3de0a5"><td class="mdescLeft"> </td><td class="mdescRight">Sets the <em>value</em> of the LED at <em>index</em> in the charliplexed array. <a href="#ab103c9687a0890faf72e4da79e3de0a5">More...</a><br/></td></tr>
|
||||
<tr class="separator:ab103c9687a0890faf72e4da79e3de0a5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a89312f2fd1d27c4e56346ed9cccfb9f6"><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6">pwmLed</a> (int index) const </td></tr>
|
||||
<tr class="memdesc:a89312f2fd1d27c4e56346ed9cccfb9f6"><td class="mdescLeft"> </td><td class="mdescRight">Returns the PWM value of the LED at <em>index</em> in the charplexed array; between 0 and 255. <a href="#a89312f2fd1d27c4e56346ed9cccfb9f6"></a><br/></td></tr>
|
||||
<tr class="memdesc:a89312f2fd1d27c4e56346ed9cccfb9f6"><td class="mdescLeft"> </td><td class="mdescRight">Returns the PWM value of the LED at <em>index</em> in the charplexed array; between 0 and 255. <a href="#a89312f2fd1d27c4e56346ed9cccfb9f6">More...</a><br/></td></tr>
|
||||
<tr class="separator:a89312f2fd1d27c4e56346ed9cccfb9f6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a605a302e13005a1aa3d68d0e22bc474b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b">setPwmLed</a> (int index, uint8_t value)</td></tr>
|
||||
<tr class="memdesc:a605a302e13005a1aa3d68d0e22bc474b"><td class="mdescLeft"> </td><td class="mdescRight">Sets the PWM <em>value</em> of the LED at <em>index</em> in the charliplexed array; between 0 and 255. <a href="#a605a302e13005a1aa3d68d0e22bc474b"></a><br/></td></tr>
|
||||
<tr class="memdesc:a605a302e13005a1aa3d68d0e22bc474b"><td class="mdescLeft"> </td><td class="mdescRight">Sets the PWM <em>value</em> of the LED at <em>index</em> in the charliplexed array; between 0 and 255. <a href="#a605a302e13005a1aa3d68d0e22bc474b">More...</a><br/></td></tr>
|
||||
<tr class="separator:a605a302e13005a1aa3d68d0e22bc474b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:abb429659a7b1ee4c7306ea659050cb30"><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30">holdTime</a> () const </td></tr>
|
||||
<tr class="memdesc:abb429659a7b1ee4c7306ea659050cb30"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of microseconds that each LED should be held on for before moving onto the next in <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a>. <a href="#abb429659a7b1ee4c7306ea659050cb30"></a><br/></td></tr>
|
||||
<tr class="memdesc:abb429659a7b1ee4c7306ea659050cb30"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of microseconds that each LED should be held on for before moving onto the next in <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a>. <a href="#abb429659a7b1ee4c7306ea659050cb30">More...</a><br/></td></tr>
|
||||
<tr class="separator:abb429659a7b1ee4c7306ea659050cb30"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8502f4c752faba37023ced587695f6a4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#a8502f4c752faba37023ced587695f6a4">setHoldTime</a> (unsigned long us)</td></tr>
|
||||
<tr class="memdesc:a8502f4c752faba37023ced587695f6a4"><td class="mdescLeft"> </td><td class="mdescRight">Sets the number of microseconds that each LED should be held on for before moving onto the next in <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a> to <em>us</em>. <a href="#a8502f4c752faba37023ced587695f6a4"></a><br/></td></tr>
|
||||
<tr class="memdesc:a8502f4c752faba37023ced587695f6a4"><td class="mdescLeft"> </td><td class="mdescRight">Sets the number of microseconds that each LED should be held on for before moving onto the next in <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a> to <em>us</em>. <a href="#a8502f4c752faba37023ced587695f6a4">More...</a><br/></td></tr>
|
||||
<tr class="separator:a8502f4c752faba37023ced587695f6a4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a8313edeacd8387c428b8299d52584d6a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a">loop</a> ()</td></tr>
|
||||
<tr class="memdesc:a8313edeacd8387c428b8299d52584d6a"><td class="mdescLeft"> </td><td class="mdescRight">Runs the multiplexing loop, to display the LED states on the charlieplexed array. <a href="#a8313edeacd8387c428b8299d52584d6a"></a><br/></td></tr>
|
||||
<tr class="memdesc:a8313edeacd8387c428b8299d52584d6a"><td class="mdescLeft"> </td><td class="mdescRight">Runs the multiplexing loop, to display the LED states on the charlieplexed array. <a href="#a8313edeacd8387c428b8299d52584d6a">More...</a><br/></td></tr>
|
||||
<tr class="separator:a8313edeacd8387c428b8299d52584d6a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:a3c961bfff866e400dad371f0376f096b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classCharlieplex.html#a3c961bfff866e400dad371f0376f096b">refresh</a> ()</td></tr>
|
||||
<tr class="memdesc:a3c961bfff866e400dad371f0376f096b"><td class="mdescLeft"> </td><td class="mdescRight">Refreshes the charlieplexed array by advancing to the next LED that needs to be lit. <a href="#a3c961bfff866e400dad371f0376f096b"></a><br/></td></tr>
|
||||
<tr class="memdesc:a3c961bfff866e400dad371f0376f096b"><td class="mdescLeft"> </td><td class="mdescRight">Refreshes the charlieplexed array by advancing to the next LED that needs to be lit. <a href="#a3c961bfff866e400dad371f0376f096b">More...</a><br/></td></tr>
|
||||
<tr class="separator:a3c961bfff866e400dad371f0376f096b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2>Detailed Description</h2>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<div class="textblock"><p>Manage an array of LED's in a charlieplexed arrangement. </p>
|
||||
<p><a href="http://en.wikipedia.org/wiki/Charlieplexing">Charlieplexing</a> is a technique for multiplexing large numbers of LED's on a small number of microcontroller output pins. LED's are arranged in complementary pairs; the simplest being for two output pins:</p>
|
||||
<div class="image">
|
||||
@@ -132,11 +144,11 @@ Public Member Functions</h2></td></tr>
|
||||
<img src="charlieplex3pin.png" alt="charlieplex3pin.png"/>
|
||||
</div>
|
||||
<p>In this case, LED5 is lit when Pin1 is 1, Pin3 is 0, and Pin2 is set to a high-impedance input to "disconnect" it.</p>
|
||||
<p><a class="el" href="classCharlieplex.html" title="Manage an array of LED's in a charlieplexed arrangement.">Charlieplex</a> presents a simple array of <a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a> values that indicate whether each LED is on, off, or in an intermediate PWM state (if <a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b" title="Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255.">setPwmLed()</a> is used). The application must call <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a> or <a class="el" href="classCharlieplex.html#a3c961bfff866e400dad371f0376f096b" title="Refreshes the charlieplexed array by advancing to the next LED that needs to be lit.">refresh()</a> on a regular basis to ensure that the multiplexed display is kept up to date. The following example drives 6 LED's connected to the output pins D9, D10, and D11:</p>
|
||||
<p><a class="el" href="classCharlieplex.html" title="Manage an array of LED's in a charlieplexed arrangement. ">Charlieplex</a> presents a simple array of <a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a> values that indicate whether each LED is on, off, or in an intermediate PWM state (if <a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b" title="Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255. ">setPwmLed()</a> is used). The application must call <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a> or <a class="el" href="classCharlieplex.html#a3c961bfff866e400dad371f0376f096b" title="Refreshes the charlieplexed array by advancing to the next LED that needs to be lit. ">refresh()</a> on a regular basis to ensure that the multiplexed display is kept up to date. The following example drives 6 LED's connected to the output pins D9, D10, and D11:</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#include <Charlieplex.h></span></div>
|
||||
<div class="line"></div>
|
||||
<div class="line">byte pins[3] = {9, 10, 11};</div>
|
||||
<div class="line"><a class="code" href="classCharlieplex.html" title="Manage an array of LED's in a charlieplexed arrangement.">Charlieplex</a> charlie(pins, <span class="keyword">sizeof</span>(pins));</div>
|
||||
<div class="line"><a class="code" href="classCharlieplex.html">Charlieplex</a> charlie(pins, <span class="keyword">sizeof</span>(pins));</div>
|
||||
<div class="line"></div>
|
||||
<div class="line"><span class="keywordtype">void</span> setup() {</div>
|
||||
<div class="line"> charlie.setLed(0, <span class="keyword">true</span>); <span class="comment">// Turn on LED1</span></div>
|
||||
@@ -144,7 +156,7 @@ Public Member Functions</h2></td></tr>
|
||||
<div class="line"> charlie.setPwmLed(5, 64); <span class="comment">// Set LED6 to one-quarter on</span></div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"></div>
|
||||
<div class="line"><span class="keywordtype">void</span> <a class="code" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop</a>() {</div>
|
||||
<div class="line"><span class="keywordtype">void</span> <a class="code" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a">loop</a>() {</div>
|
||||
<div class="line"> charlie.loop();</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --></p>
|
||||
@@ -156,15 +168,15 @@ Public Member Functions</h2></td></tr>
|
||||
<div class="image">
|
||||
<img src="charlieplex5pin.png" alt="charlieplex5pin.png"/>
|
||||
</div>
|
||||
<p>Circuits for higher numbers of LED's get increasingly complex. For those cases it can be easier to use traditional multiplexing matrix arrangements and shift registers. The <a class="el" href="classDMD.html" title="Handle large dot matrix displays composed of LED's.">DMD</a> class does this for a specific kind of large dot matrix display. Otherwise, use the following pseudocode to determine how to connect the LED's for higher numbers of pins:</p>
|
||||
<p>Circuits for higher numbers of LED's get increasingly complex. For those cases it can be easier to use traditional multiplexing matrix arrangements and shift registers. The <a class="el" href="classDMD.html" title="Handle large dot matrix displays composed of LED's. ">DMD</a> class does this for a specific kind of large dot matrix display. Otherwise, use the following pseudocode to determine how to connect the LED's for higher numbers of pins:</p>
|
||||
<div class="fragment"><div class="line">n = 1</div>
|
||||
<div class="line"><span class="keywordflow">for</span> Pass = 1 to NumPins-1:</div>
|
||||
<div class="line"> <span class="keywordflow">for</span> Pin = 1 to NumPins-Pass:</div>
|
||||
<div class="line"> LED[n] is connected between Pin (anode) and Pin+Pass (cathode)</div>
|
||||
<div class="line"> LED[n+1] is connected between Pin+Pass (anode) and Pin (cathode)</div>
|
||||
<div class="line"> n = n + 2</div>
|
||||
</div><!-- fragment --><p>Note: while the above circuit diagrams and psuedocode use 1-based numbering for LED's, <a class="el" href="classCharlieplex.html" title="Manage an array of LED's in a charlieplexed arrangement.">Charlieplex</a> uses 0-based numbering in the <a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a>, <a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5" title="Sets the value of the LED at index in the charliplexed array.">setLed()</a>, <a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6" title="Returns the PWM value of the LED at index in the charplexed array; between 0 and 255.">pwmLed()</a>, and <a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b" title="Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255.">setPwmLed()</a> functions.</p>
|
||||
<p>It isn't necessary to wire up all LED's. If you only need 10 LED's, then use the 4-output circuit and omit LED11 and LED12. <a class="el" href="classCharlieplex.html" title="Manage an array of LED's in a charlieplexed arrangement.">Charlieplex</a> only drives LED's that are lit; LED's that are unlit or unused will be skipped during the refresh scan. The maximum number of LED's that that can be driven by a specific number of pins is given by the following table:</p>
|
||||
</div><!-- fragment --><p>Note: while the above circuit diagrams and psuedocode use 1-based numbering for LED's, <a class="el" href="classCharlieplex.html" title="Manage an array of LED's in a charlieplexed arrangement. ">Charlieplex</a> uses 0-based numbering in the <a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a>, <a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5" title="Sets the value of the LED at index in the charliplexed array. ">setLed()</a>, <a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6" title="Returns the PWM value of the LED at index in the charplexed array; between 0 and 255. ">pwmLed()</a>, and <a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b" title="Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255. ">setPwmLed()</a> functions.</p>
|
||||
<p>It isn't necessary to wire up all LED's. If you only need 10 LED's, then use the 4-output circuit and omit LED11 and LED12. <a class="el" href="classCharlieplex.html" title="Manage an array of LED's in a charlieplexed arrangement. ">Charlieplex</a> only drives LED's that are lit; LED's that are unlit or unused will be skipped during the refresh scan. The maximum number of LED's that that can be driven by a specific number of pins is given by the following table:</p>
|
||||
<table class="doxtable">
|
||||
<tr>
|
||||
<td>Number of Pins</td><td>Number of LED's </td></tr>
|
||||
@@ -191,7 +203,7 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8h_source.html#l00028">28</a> of file <a class="el" href="Charlieplex_8h_source.html">Charlieplex.h</a>.</p>
|
||||
</div><h2>Constructor & Destructor Documentation</h2>
|
||||
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
||||
<a class="anchor" id="abfb0d0456bcbadbf60c21f615adacdbd"></a>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -218,13 +230,13 @@ Public Member Functions</h2></td></tr>
|
||||
|
||||
<p>Constructs a new charliexplexing array where the output pins are specified by the <em>numPins</em> entries in <em>pins</em>. </p>
|
||||
<p>Note: <em>numPins</em> must be 2 or greater for correct operation.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a5008aa4143d381ce34a3aed1a3843e4e" title="Returns the number of LED's in this charlieplexed array based on the number of pins.">count()</a>, <a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5" title="Sets the value of the LED at index in the charliplexed array.">setLed()</a> </dd></dl>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a5008aa4143d381ce34a3aed1a3843e4e" title="Returns the number of LED's in this charlieplexed array based on the number of pins. ">count()</a>, <a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5" title="Sets the value of the LED at index in the charliplexed array. ">setLed()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8cpp_source.html#l00121">121</a> of file <a class="el" href="Charlieplex_8cpp_source.html">Charlieplex.cpp</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2>Member Function Documentation</h2>
|
||||
<h2 class="groupheader">Member Function Documentation</h2>
|
||||
<a class="anchor" id="a5008aa4143d381ce34a3aed1a3843e4e"></a>
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
@@ -298,9 +310,9 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the number of microseconds that each LED should be held on for before moving onto the next in <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a>. </p>
|
||||
<p>Returns the number of microseconds that each LED should be held on for before moving onto the next in <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a>. </p>
|
||||
<p>The default value is calculated so that all LED's can be refreshed with a rate of at least 200 Hz, which is necessary for handling PWM output on multiple LED's. The less LED's that are lit at once, the faster the display will refresh.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a8502f4c752faba37023ced587695f6a4" title="Sets the number of microseconds that each LED should be held on for before moving onto the next in lo...">setHoldTime()</a>, <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a> </dd></dl>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a8502f4c752faba37023ced587695f6a4" title="Sets the number of microseconds that each LED should be held on for before moving onto the next in lo...">setHoldTime()</a>, <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8h_source.html#l00042">42</a> of file <a class="el" href="Charlieplex_8h_source.html">Charlieplex.h</a>.</p>
|
||||
|
||||
@@ -330,7 +342,7 @@ Public Member Functions</h2></td></tr>
|
||||
|
||||
<p>Returns the value of the LED at <em>index</em> in the charplexed array; true if lit; false if not lit. </p>
|
||||
<p>If the LED is displaying a PWM value, then this function will return true for any non-zero PWM value.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5" title="Sets the value of the LED at index in the charliplexed array.">setLed()</a>, <a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6" title="Returns the PWM value of the LED at index in the charplexed array; between 0 and 255.">pwmLed()</a> </dd></dl>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5" title="Sets the value of the LED at index in the charliplexed array. ">setLed()</a>, <a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6" title="Returns the PWM value of the LED at index in the charplexed array; between 0 and 255. ">pwmLed()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8h_source.html#l00036">36</a> of file <a class="el" href="Charlieplex_8h_source.html">Charlieplex.h</a>.</p>
|
||||
|
||||
@@ -350,10 +362,10 @@ Public Member Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Runs the multiplexing loop, to display the LED states on the charlieplexed array. </p>
|
||||
<p>If <a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a> microseconds have elapsed since the last call to <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a>, then the current LED is turned off and the next LED that needs to be lit is turned on.</p>
|
||||
<p>LED's that do not need to be lit are skipped. The total time for a single pass through all lit LED's may be very short if only a few LED's are lit at once. If all LED's are lit, then the total time for a single pass will be <a class="el" href="classCharlieplex.html#a5008aa4143d381ce34a3aed1a3843e4e" title="Returns the number of LED's in this charlieplexed array based on the number of pins.">count()</a> * <a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a> microseconds.</p>
|
||||
<p>If the application is using timer interrupts to drive the multiplexing process, then use <a class="el" href="classCharlieplex.html#a3c961bfff866e400dad371f0376f096b" title="Refreshes the charlieplexed array by advancing to the next LED that needs to be lit.">refresh()</a> instead of <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a>.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a>, <a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6" title="Returns the PWM value of the LED at index in the charplexed array; between 0 and 255.">pwmLed()</a>, <a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a>, <a class="el" href="classCharlieplex.html#a3c961bfff866e400dad371f0376f096b" title="Refreshes the charlieplexed array by advancing to the next LED that needs to be lit.">refresh()</a> </dd></dl>
|
||||
<p>If <a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a> microseconds have elapsed since the last call to <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a>, then the current LED is turned off and the next LED that needs to be lit is turned on.</p>
|
||||
<p>LED's that do not need to be lit are skipped. The total time for a single pass through all lit LED's may be very short if only a few LED's are lit at once. If all LED's are lit, then the total time for a single pass will be <a class="el" href="classCharlieplex.html#a5008aa4143d381ce34a3aed1a3843e4e" title="Returns the number of LED's in this charlieplexed array based on the number of pins. ">count()</a> * <a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a> microseconds.</p>
|
||||
<p>If the application is using timer interrupts to drive the multiplexing process, then use <a class="el" href="classCharlieplex.html#a3c961bfff866e400dad371f0376f096b" title="Refreshes the charlieplexed array by advancing to the next LED that needs to be lit. ">refresh()</a> instead of <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a>.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a>, <a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6" title="Returns the PWM value of the LED at index in the charplexed array; between 0 and 255. ">pwmLed()</a>, <a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a>, <a class="el" href="classCharlieplex.html#a3c961bfff866e400dad371f0376f096b" title="Refreshes the charlieplexed array by advancing to the next LED that needs to be lit. ">refresh()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8cpp_source.html#l00277">277</a> of file <a class="el" href="Charlieplex_8cpp_source.html">Charlieplex.cpp</a>.</p>
|
||||
|
||||
@@ -382,7 +394,7 @@ Public Member Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Returns the PWM value of the LED at <em>index</em> in the charplexed array; between 0 and 255. </p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b" title="Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255.">setPwmLed()</a>, <a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a> </dd></dl>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b" title="Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255. ">setPwmLed()</a>, <a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8h_source.html#l00039">39</a> of file <a class="el" href="Charlieplex_8h_source.html">Charlieplex.h</a>.</p>
|
||||
|
||||
@@ -402,8 +414,8 @@ Public Member Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Refreshes the charlieplexed array by advancing to the next LED that needs to be lit. </p>
|
||||
<p>This function is intended to be called from a timer interrupt service routine to advance the multiplexing state without the main application having to explicitly call <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a>.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a> </dd></dl>
|
||||
<p>This function is intended to be called from a timer interrupt service routine to advance the multiplexing state without the main application having to explicitly call <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a>.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8cpp_source.html#l00296">296</a> of file <a class="el" href="Charlieplex_8cpp_source.html">Charlieplex.cpp</a>.</p>
|
||||
|
||||
@@ -431,8 +443,8 @@ Public Member Functions</h2></td></tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Sets the number of microseconds that each LED should be held on for before moving onto the next in <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a> to <em>us</em>. </p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a>, <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array.">loop()</a> </dd></dl>
|
||||
<p>Sets the number of microseconds that each LED should be held on for before moving onto the next in <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a> to <em>us</em>. </p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a>, <a class="el" href="classCharlieplex.html#a8313edeacd8387c428b8299d52584d6a" title="Runs the multiplexing loop, to display the LED states on the charlieplexed array. ...">loop()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8h_source.html#l00043">43</a> of file <a class="el" href="Charlieplex_8h_source.html">Charlieplex.h</a>.</p>
|
||||
|
||||
@@ -472,7 +484,7 @@ Public Member Functions</h2></td></tr>
|
||||
|
||||
<p>Sets the <em>value</em> of the LED at <em>index</em> in the charliplexed array. </p>
|
||||
<p>The brightness of the LED will be proportional to the number of LED's that are currently lit, as the <a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a> refresh rate will cause the LED to appear to dim; the more LED's that are lit the less overall time each individual LED is held on. For best results, only a single LED should be lit at once or higher-brightness LED's should be used.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a>, <a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b" title="Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255.">setPwmLed()</a> </dd></dl>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a90fd09f24b62424b0b7b8bcdb0140b9d" title="Returns the value of the LED at index in the charplexed array; true if lit; false if not lit...">led()</a>, <a class="el" href="classCharlieplex.html#a605a302e13005a1aa3d68d0e22bc474b" title="Sets the PWM value of the LED at index in the charliplexed array; between 0 and 255. ">setPwmLed()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8h_source.html#l00037">37</a> of file <a class="el" href="Charlieplex_8h_source.html">Charlieplex.h</a>.</p>
|
||||
|
||||
@@ -513,7 +525,7 @@ Public Member Functions</h2></td></tr>
|
||||
<p>Sets the PWM <em>value</em> of the LED at <em>index</em> in the charliplexed array; between 0 and 255. </p>
|
||||
<p>If this function is used, then it is assumed that the output pins are capable of PWM output.</p>
|
||||
<p>The PWM-specified brightness of the LED will also be affected to the number of LED's that are currently lit, as the <a class="el" href="classCharlieplex.html#abb429659a7b1ee4c7306ea659050cb30" title="Returns the number of microseconds that each LED should be held on for before moving onto the next in...">holdTime()</a> refresh rate will cause the LED to appear to dim; the more LED's that are lit the less overall time each individual LED is held on. For best results, only a single LED should be lit at once or higher-brightness LED's should be used.</p>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6" title="Returns the PWM value of the LED at index in the charplexed array; between 0 and 255.">pwmLed()</a>, <a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5" title="Sets the value of the LED at index in the charliplexed array.">setLed()</a> </dd></dl>
|
||||
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classCharlieplex.html#a89312f2fd1d27c4e56346ed9cccfb9f6" title="Returns the PWM value of the LED at index in the charplexed array; between 0 and 255. ">pwmLed()</a>, <a class="el" href="classCharlieplex.html#ab103c9687a0890faf72e4da79e3de0a5" title="Sets the value of the LED at index in the charliplexed array. ">setLed()</a> </dd></dl>
|
||||
|
||||
<p>Definition at line <a class="el" href="Charlieplex_8h_source.html#l00040">40</a> of file <a class="el" href="Charlieplex_8h_source.html">Charlieplex.h</a>.</p>
|
||||
|
||||
@@ -526,9 +538,9 @@ Public Member Functions</h2></td></tr>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Sun Sep 29 2013 09:30:46 for ArduinoLibs by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Thu Mar 12 2015 19:02:05 for ArduinoLibs by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.1.2
|
||||
</a> 1.8.6
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user