mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
386 lines
24 KiB
HTML
386 lines
24 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<title>ArduinoLibs: BlinkLED Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body onload='searchBox.OnSelectItem(0);'>
|
|
<!-- Generated by Doxygen 1.7.4 -->
|
|
<script type="text/javascript"><!--
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
--></script>
|
|
<div id="top">
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">ArduinoLibs</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="modules.html"><span>Modules</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li id="searchli">
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">BlinkLED Class Reference</div> </div>
|
|
</div>
|
|
<div class="contents">
|
|
<!-- doxytag: class="BlinkLED" -->
|
|
<p>Blink a LED on a digital output pin.
|
|
<a href="classBlinkLED.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="BlinkLED_8h_source.html">BlinkLED.h</a>></code></p>
|
|
|
|
<p><a href="classBlinkLED-members.html">List of all members.</a></p>
|
|
<table class="memberdecls">
|
|
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#afc33958651e7ce6dceb428ea654c2c2f">BlinkLED</a> (uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState=false)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize a blinking LED on the specified <em>pin</em>. <a href="#afc33958651e7ce6dceb428ea654c2c2f"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#aeeaf42b94c5392935f00f0f12a58c75e">loop</a> ()</td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb">onTime</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of milliseconds the LED will be on. <a href="#a8475f78f41d1a2d5d719bec8cbbb3ebb"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">unsigned long </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc">offTime</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of milliseconds the LED will be off. <a href="#a74c640edf1a9f6e8bea1e139462908bc"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#a47f95624881063aa91c0066ed2c92258">setBlinkRate</a> (unsigned long onTime, unsigned long offTime)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the <em>onTime</em> and <em>offTime</em> (in milliseconds). <a href="#a47f95624881063aa91c0066ed2c92258"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233">state</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the current state of the LED; true is on, false is off. <a href="#ab89b5b3435998ea6699d4bf94866e233"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#af904a345e56d49948a042ac439d0b9d4">setState</a> (bool state)</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the current <em>state</em> of the LED, where true is on, false is off. <a href="#af904a345e56d49948a042ac439d0b9d4"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#a2760a0223cd6a0598b961f681ffb5c0a">pause</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Pauses the LED blink cycle in its current <a class="el" href="classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233" title="Returns the current state of the LED; true is on, false is off.">state()</a>. <a href="#a2760a0223cd6a0598b961f681ffb5c0a"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#a380241e4dfd20e8a558487227f2f4252">resume</a> ()</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Resumes the LED blink cycle after a <a class="el" href="classBlinkLED.html#a2760a0223cd6a0598b961f681ffb5c0a" title="Pauses the LED blink cycle in its current state().">pause()</a>. <a href="#a380241e4dfd20e8a558487227f2f4252"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#aa0ee318b886b84fb71d5831fa456ecc8">isPaused</a> () const </td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the LED blink cycle is paused; false otherwise. <a href="#aa0ee318b886b84fb71d5831fa456ecc8"></a><br/></td></tr>
|
|
</table>
|
|
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
|
<div class="textblock"><p>Blink a LED on a digital output pin. </p>
|
|
<p><a class="el" href="classBlinkLED.html" title="Blink a LED on a digital output pin.">BlinkLED</a> simplies the process of blinking a LED by encapsulating the control logic into a single class. The following example strobes the status LED on D13 with a period of 70 milliseconds on, 930 milliseconds off (the LED is initially off):</p>
|
|
<div class="fragment"><pre class="fragment"><span class="preprocessor"> #include <BlinkLED.h></span>
|
|
|
|
<a class="code" href="classBlinkLED.html" title="Blink a LED on a digital output pin.">BlinkLED</a> statusBlink(13, 70, 930);
|
|
|
|
<span class="keywordtype">void</span> setup() {}
|
|
|
|
<span class="keywordtype">void</span> <a class="code" href="classBlinkLED.html#aeeaf42b94c5392935f00f0f12a58c75e">loop</a>() {
|
|
statusBlink.loop();
|
|
}
|
|
</pre></div><p>The current <a class="el" href="classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233" title="Returns the current state of the LED; true is on, false is off.">state()</a> of the LED can be changed immediately by calling <a class="el" href="classBlinkLED.html#af904a345e56d49948a042ac439d0b9d4" title="Sets the current state of the LED, where true is on, false is off.">setState()</a>. The blink rate can be modified with <a class="el" href="classBlinkLED.html#a47f95624881063aa91c0066ed2c92258" title="Sets the onTime and offTime (in milliseconds).">setBlinkRate()</a>. And the blink cycle can be suspended and restarted with <a class="el" href="classBlinkLED.html#a2760a0223cd6a0598b961f681ffb5c0a" title="Pauses the LED blink cycle in its current state().">pause()</a> and <a class="el" href="classBlinkLED.html#a380241e4dfd20e8a558487227f2f4252" title="Resumes the LED blink cycle after a pause().">resume()</a>. </p>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8h_source.html#l00028">28</a> of file <a class="el" href="BlinkLED_8h_source.html">BlinkLED.h</a>.</p>
|
|
</div><hr/><h2>Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" id="afc33958651e7ce6dceb428ea654c2c2f"></a><!-- doxytag: member="BlinkLED::BlinkLED" ref="afc33958651e7ce6dceb428ea654c2c2f" args="(uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState=false)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">BlinkLED::BlinkLED </td>
|
|
<td>(</td>
|
|
<td class="paramtype">uint8_t </td>
|
|
<td class="paramname"><em>pin</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned long </td>
|
|
<td class="paramname"><em>onTime</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned long </td>
|
|
<td class="paramname"><em>offTime</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>initialState</em> = <code>false</code> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Initialize a blinking LED on the specified <em>pin</em>. </p>
|
|
<p>The LED will blink with a rate defined by <em>onTime</em> and <em>offTime</em> (in milliseconds). Initially the LED's state is given by <em>initialState</em>, where true means initially on and false means initially off. </p>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8cpp_source.html#l00064">64</a> of file <a class="el" href="BlinkLED_8cpp_source.html">BlinkLED.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/><h2>Member Function Documentation</h2>
|
|
<a class="anchor" id="aa0ee318b886b84fb71d5831fa456ecc8"></a><!-- doxytag: member="BlinkLED::isPaused" ref="aa0ee318b886b84fb71d5831fa456ecc8" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool BlinkLED::isPaused </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns true if the LED blink cycle is paused; false otherwise. </p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBlinkLED.html#a2760a0223cd6a0598b961f681ffb5c0a" title="Pauses the LED blink cycle in its current state().">pause()</a>, <a class="el" href="classBlinkLED.html#a380241e4dfd20e8a558487227f2f4252" title="Resumes the LED blink cycle after a pause().">resume()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8h_source.html#l00044">44</a> of file <a class="el" href="BlinkLED_8h_source.html">BlinkLED.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aeeaf42b94c5392935f00f0f12a58c75e"></a><!-- doxytag: member="BlinkLED::loop" ref="aeeaf42b94c5392935f00f0f12a58c75e" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void BlinkLED::loop </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
<p>Perform a single iteration of the blink loop for this LED. </p>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8cpp_source.html#l00079">79</a> of file <a class="el" href="BlinkLED_8cpp_source.html">BlinkLED.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a74c640edf1a9f6e8bea1e139462908bc"></a><!-- doxytag: member="BlinkLED::offTime" ref="a74c640edf1a9f6e8bea1e139462908bc" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">unsigned long BlinkLED::offTime </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the number of milliseconds the LED will be off. </p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb" title="Returns the number of milliseconds the LED will be on.">onTime()</a>, <a class="el" href="classBlinkLED.html#a47f95624881063aa91c0066ed2c92258" title="Sets the onTime and offTime (in milliseconds).">setBlinkRate()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8h_source.html#l00036">36</a> of file <a class="el" href="BlinkLED_8h_source.html">BlinkLED.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a8475f78f41d1a2d5d719bec8cbbb3ebb"></a><!-- doxytag: member="BlinkLED::onTime" ref="a8475f78f41d1a2d5d719bec8cbbb3ebb" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">unsigned long BlinkLED::onTime </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the number of milliseconds the LED will be on. </p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc" title="Returns the number of milliseconds the LED will be off.">offTime()</a>, <a class="el" href="classBlinkLED.html#a47f95624881063aa91c0066ed2c92258" title="Sets the onTime and offTime (in milliseconds).">setBlinkRate()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8h_source.html#l00035">35</a> of file <a class="el" href="BlinkLED_8h_source.html">BlinkLED.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2760a0223cd6a0598b961f681ffb5c0a"></a><!-- doxytag: member="BlinkLED::pause" ref="a2760a0223cd6a0598b961f681ffb5c0a" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void BlinkLED::pause </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td><code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Pauses the LED blink cycle in its current <a class="el" href="classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233" title="Returns the current state of the LED; true is on, false is off.">state()</a>. </p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBlinkLED.html#a380241e4dfd20e8a558487227f2f4252" title="Resumes the LED blink cycle after a pause().">resume()</a>, <a class="el" href="classBlinkLED.html#aa0ee318b886b84fb71d5831fa456ecc8" title="Returns true if the LED blink cycle is paused; false otherwise.">isPaused()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8h_source.html#l00042">42</a> of file <a class="el" href="BlinkLED_8h_source.html">BlinkLED.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a380241e4dfd20e8a558487227f2f4252"></a><!-- doxytag: member="BlinkLED::resume" ref="a380241e4dfd20e8a558487227f2f4252" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void BlinkLED::resume </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Resumes the LED blink cycle after a <a class="el" href="classBlinkLED.html#a2760a0223cd6a0598b961f681ffb5c0a" title="Pauses the LED blink cycle in its current state().">pause()</a>. </p>
|
|
<p>The LED will complete its current <a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb" title="Returns the number of milliseconds the LED will be on.">onTime()</a> or <a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc" title="Returns the number of milliseconds the LED will be off.">offTime()</a> and then will switch to the opposite <a class="el" href="classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233" title="Returns the current state of the LED; true is on, false is off.">state()</a>. If <a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb" title="Returns the number of milliseconds the LED will be on.">onTime()</a> or <a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc" title="Returns the number of milliseconds the LED will be off.">offTime()</a> has already expired, then the LED will immediately switch state.</p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBlinkLED.html#a2760a0223cd6a0598b961f681ffb5c0a" title="Pauses the LED blink cycle in its current state().">pause()</a>, <a class="el" href="classBlinkLED.html#aa0ee318b886b84fb71d5831fa456ecc8" title="Returns true if the LED blink cycle is paused; false otherwise.">isPaused()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8cpp_source.html#l00170">170</a> of file <a class="el" href="BlinkLED_8cpp_source.html">BlinkLED.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a47f95624881063aa91c0066ed2c92258"></a><!-- doxytag: member="BlinkLED::setBlinkRate" ref="a47f95624881063aa91c0066ed2c92258" args="(unsigned long onTime, unsigned long offTime)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void BlinkLED::setBlinkRate </td>
|
|
<td>(</td>
|
|
<td class="paramtype">unsigned long </td>
|
|
<td class="paramname"><em>onTime</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned long </td>
|
|
<td class="paramname"><em>offTime</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the <em>onTime</em> and <em>offTime</em> (in milliseconds). </p>
|
|
<p>The change takes effect immediately. If the current <a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb" title="Returns the number of milliseconds the LED will be on.">onTime()</a> or <a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc" title="Returns the number of milliseconds the LED will be off.">offTime()</a> has now expired, then the LED will immediately switch to the opposite <a class="el" href="classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233" title="Returns the current state of the LED; true is on, false is off.">state()</a>.</p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb" title="Returns the number of milliseconds the LED will be on.">onTime()</a>, <a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc" title="Returns the number of milliseconds the LED will be off.">offTime()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8cpp_source.html#l00122">122</a> of file <a class="el" href="BlinkLED_8cpp_source.html">BlinkLED.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af904a345e56d49948a042ac439d0b9d4"></a><!-- doxytag: member="BlinkLED::setState" ref="af904a345e56d49948a042ac439d0b9d4" args="(bool state)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void BlinkLED::setState </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"><em>state</em></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the current <em>state</em> of the LED, where true is on, false is off. </p>
|
|
<p>If the LED is already set to <em>state</em>, then it will complete its current cycle of <a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb" title="Returns the number of milliseconds the LED will be on.">onTime()</a> or <a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc" title="Returns the number of milliseconds the LED will be off.">offTime()</a>. Otherwise the LED is immediately set to <em>state</em> and a new cycle begins.</p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233" title="Returns the current state of the LED; true is on, false is off.">state()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8cpp_source.html#l00145">145</a> of file <a class="el" href="BlinkLED_8cpp_source.html">BlinkLED.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab89b5b3435998ea6699d4bf94866e233"></a><!-- doxytag: member="BlinkLED::state" ref="ab89b5b3435998ea6699d4bf94866e233" args="() const " -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool BlinkLED::state </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const<code> [inline]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the current state of the LED; true is on, false is off. </p>
|
|
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classBlinkLED.html#af904a345e56d49948a042ac439d0b9d4" title="Sets the current state of the LED, where true is on, false is off.">setState()</a> </dd></dl>
|
|
|
|
<p>Definition at line <a class="el" href="BlinkLED_8h_source.html#l00039">39</a> of file <a class="el" href="BlinkLED_8h_source.html">BlinkLED.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li><a class="el" href="BlinkLED_8h_source.html">BlinkLED.h</a></li>
|
|
<li><a class="el" href="BlinkLED_8cpp_source.html">BlinkLED.cpp</a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<hr class="footer"/><address class="footer"><small>Generated on Fri Jun 1 2012 14:29:17 for ArduinoLibs by 
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
|
|
</body>
|
|
</html>
|