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: Dumping Infrared Remote Control Codes</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>
|
||||
@@ -78,7 +79,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
<div class="title">Dumping Infrared Remote Control Codes </div> </div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><p>This example uses the <a class="el" href="classIRreceiver.html" title="Manages the reception of RC-5 commands from an infrared remote control.">IRreceiver</a> class to dump commands that are received from an infrared remote control that is compatible with the <a href="http://en.wikipedia.org/wiki/RC-5">Philips RC-5 protocol</a>. Commands are dumped to the serial port. The example needs a 3-pin infrared receiver connected to D2, GND, and 5V:</p>
|
||||
<div class="textblock"><p>This example uses the <a class="el" href="classIRreceiver.html" title="Manages the reception of RC-5 commands from an infrared remote control. ">IRreceiver</a> class to dump commands that are received from an infrared remote control that is compatible with the <a href="http://en.wikipedia.org/wiki/RC-5">Philips RC-5 protocol</a>. Commands are dumped to the serial port. The example needs a 3-pin infrared receiver connected to D2, GND, and 5V:</p>
|
||||
<div class="image">
|
||||
<img src="irchip.jpg" alt="irchip.jpg"/>
|
||||
</div>
|
||||
@@ -87,7 +88,7 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
<div class="line"></div>
|
||||
<div class="line"><span class="preprocessor">#include <IRreceiver.h></span></div>
|
||||
<div class="line"></div>
|
||||
<div class="line"><a class="code" href="classIRreceiver.html" title="Manages the reception of RC-5 commands from an infrared remote control.">IRreceiver</a> ir;</div>
|
||||
<div class="line"><a class="code" href="classIRreceiver.html">IRreceiver</a> ir;</div>
|
||||
<div class="line"></div>
|
||||
<div class="line"><span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *systems[32] = {</div>
|
||||
<div class="line"> <span class="stringliteral">"TV"</span>,</div>
|
||||
@@ -262,18 +263,18 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
<div class="line">}</div>
|
||||
<div class="line"></div>
|
||||
<div class="line"><span class="keywordtype">void</span> loop() {</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> cmd = ir.<a class="code" href="classIRreceiver.html#a4b021592a2b089dc2f1e138a38506fda" title="Returns the next command from the remote control.">command</a>();</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> cmd = ir.<a class="code" href="classIRreceiver.html#a4b021592a2b089dc2f1e138a38506fda">command</a>();</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (cmd >= 0) {</div>
|
||||
<div class="line"> Serial.print(<span class="stringliteral">"IR system="</span>);</div>
|
||||
<div class="line"> Serial.print(ir.<a class="code" href="classIRreceiver.html#a19e9334ae97812fa85078507d105478f" title="Returns the system number of the previous command(), indicating whether the command was for a TV...">system</a>());</div>
|
||||
<div class="line"> Serial.print(ir.<a class="code" href="classIRreceiver.html#a19e9334ae97812fa85078507d105478f">system</a>());</div>
|
||||
<div class="line"> Serial.print(<span class="stringliteral">" (RC5_SYS_"</span>);</div>
|
||||
<div class="line"> Serial.print(systems[ir.<a class="code" href="classIRreceiver.html#a19e9334ae97812fa85078507d105478f" title="Returns the system number of the previous command(), indicating whether the command was for a TV...">system</a>()]);</div>
|
||||
<div class="line"> Serial.print(systems[ir.<a class="code" href="classIRreceiver.html#a19e9334ae97812fa85078507d105478f">system</a>()]);</div>
|
||||
<div class="line"> Serial.print(<span class="stringliteral">"), command="</span>);</div>
|
||||
<div class="line"> Serial.print(cmd & 0x7F);</div>
|
||||
<div class="line"> Serial.print(<span class="stringliteral">" (RC5_"</span>);</div>
|
||||
<div class="line"> Serial.print(commands[cmd & 0x7F]);</div>
|
||||
<div class="line"> Serial.print(<span class="stringliteral">")"</span>);</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (cmd & <a class="code" href="classIRreceiver.html#a9c37631cc1291dc47cabcfef2f631cf9" title="Flag that is added to the output of command() when the command is an auto-repeated button press rathe...">IRreceiver::AUTO_REPEAT</a>)</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (cmd & <a class="code" href="classIRreceiver.html#a9c37631cc1291dc47cabcfef2f631cf9">IRreceiver::AUTO_REPEAT</a>)</div>
|
||||
<div class="line"> Serial.println(<span class="stringliteral">", auto-repeat"</span>);</div>
|
||||
<div class="line"> <span class="keywordflow">else</span></div>
|
||||
<div class="line"> Serial.println();</div>
|
||||
@@ -282,9 +283,9 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||||
</div><!-- fragment --> </div></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