mirror of
https://github.com/taigrr/arduinolibs
synced 2025-01-18 04:33:12 -08:00
437 lines
28 KiB
HTML
437 lines
28 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"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.6"/>
|
|
<title>ArduinoLibs: BlinkLED Class 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>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<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>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.6 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<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>
|
|
<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>
|
|
<!-- 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><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Pages</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>
|
|
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="classBlinkLED-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">BlinkLED Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<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>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:afc33958651e7ce6dceb428ea654c2c2f"><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 <a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb">onTime</a>, unsigned long <a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc">offTime</a>, bool initialState=false)</td></tr>
|
|
<tr class="memdesc:afc33958651e7ce6dceb428ea654c2c2f"><td class="mdescLeft"> </td><td class="mdescRight">Initialize a blinking LED on the specified <em>pin</em>. <a href="#afc33958651e7ce6dceb428ea654c2c2f">More...</a><br/></td></tr>
|
|
<tr class="separator:afc33958651e7ce6dceb428ea654c2c2f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeeaf42b94c5392935f00f0f12a58c75e"><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 class="separator:aeeaf42b94c5392935f00f0f12a58c75e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8475f78f41d1a2d5d719bec8cbbb3ebb"><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 class="memdesc:a8475f78f41d1a2d5d719bec8cbbb3ebb"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of milliseconds the LED will be on. <a href="#a8475f78f41d1a2d5d719bec8cbbb3ebb">More...</a><br/></td></tr>
|
|
<tr class="separator:a8475f78f41d1a2d5d719bec8cbbb3ebb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a74c640edf1a9f6e8bea1e139462908bc"><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 class="memdesc:a74c640edf1a9f6e8bea1e139462908bc"><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of milliseconds the LED will be off. <a href="#a74c640edf1a9f6e8bea1e139462908bc">More...</a><br/></td></tr>
|
|
<tr class="separator:a74c640edf1a9f6e8bea1e139462908bc"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a47f95624881063aa91c0066ed2c92258"><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 <a class="el" href="classBlinkLED.html#a8475f78f41d1a2d5d719bec8cbbb3ebb">onTime</a>, unsigned long <a class="el" href="classBlinkLED.html#a74c640edf1a9f6e8bea1e139462908bc">offTime</a>)</td></tr>
|
|
<tr class="memdesc:a47f95624881063aa91c0066ed2c92258"><td class="mdescLeft"> </td><td class="mdescRight">Sets the <em>onTime</em> and <em>offTime</em> (in milliseconds). <a href="#a47f95624881063aa91c0066ed2c92258">More...</a><br/></td></tr>
|
|
<tr class="separator:a47f95624881063aa91c0066ed2c92258"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab89b5b3435998ea6699d4bf94866e233"><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 class="memdesc:ab89b5b3435998ea6699d4bf94866e233"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current state of the LED; true is on, false is off. <a href="#ab89b5b3435998ea6699d4bf94866e233">More...</a><br/></td></tr>
|
|
<tr class="separator:ab89b5b3435998ea6699d4bf94866e233"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af904a345e56d49948a042ac439d0b9d4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBlinkLED.html#af904a345e56d49948a042ac439d0b9d4">setState</a> (bool <a class="el" href="classBlinkLED.html#ab89b5b3435998ea6699d4bf94866e233">state</a>)</td></tr>
|
|
<tr class="memdesc:af904a345e56d49948a042ac439d0b9d4"><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">More...</a><br/></td></tr>
|
|
<tr class="separator:af904a345e56d49948a042ac439d0b9d4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2760a0223cd6a0598b961f681ffb5c0a"><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 class="memdesc:a2760a0223cd6a0598b961f681ffb5c0a"><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">More...</a><br/></td></tr>
|
|
<tr class="separator:a2760a0223cd6a0598b961f681ffb5c0a"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a380241e4dfd20e8a558487227f2f4252"><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 class="memdesc:a380241e4dfd20e8a558487227f2f4252"><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">More...</a><br/></td></tr>
|
|
<tr class="separator:a380241e4dfd20e8a558487227f2f4252"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa0ee318b886b84fb71d5831fa456ecc8"><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 class="memdesc:aa0ee318b886b84fb71d5831fa456ecc8"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the LED blink cycle is paused; false otherwise. <a href="#aa0ee318b886b84fb71d5831fa456ecc8">More...</a><br/></td></tr>
|
|
<tr class="separator:aa0ee318b886b84fb71d5831fa456ecc8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">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"><div class="line"><span class="preprocessor">#include <BlinkLED.h></span></div>
|
|
<div class="line"></div>
|
|
<div class="line"><a class="code" href="classBlinkLED.html">BlinkLED</a> statusBlink(13, 70, 930);</div>
|
|
<div class="line"></div>
|
|
<div class="line"><span class="keywordtype">void</span> setup() {}</div>
|
|
<div class="line"></div>
|
|
<div class="line"><span class="keywordtype">void</span> <a class="code" href="classBlinkLED.html#aeeaf42b94c5392935f00f0f12a58c75e">loop</a>() {</div>
|
|
<div class="line"> statusBlink.loop();</div>
|
|
<div class="line">}</div>
|
|
</div><!-- fragment --><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><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a class="anchor" id="afc33958651e7ce6dceb428ea654c2c2f"></a>
|
|
<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>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a class="anchor" id="aa0ee318b886b84fb71d5831fa456ecc8"></a>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool BlinkLED::isPaused </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns true if the LED blink cycle is paused; false otherwise. </p>
|
|
<dl class="section see"><dt>See Also</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>
|
|
<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>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">unsigned long BlinkLED::offTime </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the number of milliseconds the LED will be off. </p>
|
|
<dl class="section see"><dt>See Also</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>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">unsigned long BlinkLED::onTime </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the number of milliseconds the LED will be on. </p>
|
|
<dl class="section see"><dt>See Also</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>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void BlinkLED::pause </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </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="section see"><dt>See Also</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>
|
|
<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="section see"><dt>See Also</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>
|
|
<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="section see"><dt>See Also</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>
|
|
<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="section see"><dt>See Also</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>
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool BlinkLED::state </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Returns the current state of the LED; true is on, false is off. </p>
|
|
<dl class="section see"><dt>See Also</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><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated on Sun Feb 18 2018 09:12:22 for ArduinoLibs by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.6
|
|
</small></address>
|
|
</body>
|
|
</html>
|