DHT-sensor-library/html/_d_h_t_8h_source.html

84 lines
18 KiB
HTML
Raw Normal View History

<!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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>DHT sensor library: DHT.h Source File</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/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></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 id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">DHT sensor library
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</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 class="header">
<div class="headertitle">
<div class="title">DHT.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="_d_h_t_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#ifndef DHT_H</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#define DHT_H</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#include &quot;Arduino.h&quot;</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">/* Uncomment to enable printing out nice debug messages. */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="comment">//#define DHT_DEBUG</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="_d_h_t_8h.html#afe84d42042833e4e334c977b93ff2407"> 26</a></span>&#160;<span class="preprocessor">#define DEBUG_PRINTER \</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor"> Serial </span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor"></span><span class="comment">/* Setup debug printing macros. */</span><span class="preprocessor"></span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#ifdef DHT_DEBUG</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#define DEBUG_PRINT(...) \</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor"> { DEBUG_PRINTER.print(__VA_ARGS__); }</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#define DEBUG_PRINTLN(...) \</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor"> { DEBUG_PRINTER.println(__VA_ARGS__); }</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#define DEBUG_PRINT(...) \</span></div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="_d_h_t_8h.html#a88edd2aa4feabff4af21a997d5d8aa23"> 38</a></span>&#160;<span class="preprocessor"> {} </span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#define DEBUG_PRINTLN(...) \</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;<span class="preprocessor"> {} </span></div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="_d_h_t_8h.html#ae414eccb9fbdc7c0cc6edfc588a3aa34"> 41</a></span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="comment">/* Define types of sensors. */</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#define DHT11 11 </span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="
<div class="ttc" id="class_d_h_t_html_afa429167bfeba848ab824fee0043f79d"><div class="ttname"><a href="class_d_h_t.html#afa429167bfeba848ab824fee0043f79d">DHT::DHT</a></div><div class="ttdeci">DHT(uint8_t pin, uint8_t type, uint8_t count=6)</div><div class="ttdoc">Instantiates a new DHT class. </div><div class="ttdef"><b>Definition:</b> DHT.cpp:43</div></div>
<div class="ttc" id="class_d_h_t_html_a90530e38a2f47893e4767dda1d00d2a4"><div class="ttname"><a href="class_d_h_t.html#a90530e38a2f47893e4767dda1d00d2a4">DHT::convertFtoC</a></div><div class="ttdeci">float convertFtoC(float)</div><div class="ttdoc">Converts Fahrenheit to Celcius. </div><div class="ttdef"><b>Definition:</b> DHT.cpp:141</div></div>
<div class="ttc" id="class_d_h_t_html_a4c1508f2997a5d03968b3afdeae70e03"><div class="ttname"><a href="class_d_h_t.html#a4c1508f2997a5d03968b3afdeae70e03">DHT::read</a></div><div class="ttdeci">bool read(bool force=false)</div><div class="ttdoc">Read value from sensor or return last one from less than two seconds. </div><div class="ttdef"><b>Definition:</b> DHT.cpp:232</div></div>
<div class="ttc" id="class_d_h_t_html_a47724a419777972edf68cd5b8aa85569"><div class="ttname"><a href="class_d_h_t.html#a47724a419777972edf68cd5b8aa85569">DHT::computeHeatIndex</a></div><div class="ttdeci">float computeHeatIndex(bool isFahrenheit=true)</div><div class="ttdoc">Compute Heat Index Simplified version that reads temp and humidity from sensor. </div><div class="ttdef"><b>Definition:</b> DHT.cpp:175</div></div>
<div class="ttc" id="class_d_h_t_html"><div class="ttname"><a href="class_d_h_t.html">DHT</a></div><div class="ttdoc">Class that stores state and functions for DHT. </div><div class="ttdef"><b>Definition:</b> DHT.h:66</div></div>
<div class="ttc" id="class_d_h_t_html_a5fea0c753872b62f0ea423b03b6a0ac0"><div class="ttname"><a href="class_d_h_t.html#a5fea0c753872b62f0ea423b03b6a0ac0">DHT::begin</a></div><div class="ttdeci">void begin(uint8_t usec=55)</div><div class="ttdoc">Setup sensor pins and set pull timings. </div><div class="ttdef"><b>Definition:</b> DHT.cpp:64</div></div>
<div class="ttc" id="class_d_h_t_html_a68be09105aa7d831bb473c9d774918cf"><div class="ttname"><a href="class_d_h_t.html#a68be09105aa7d831bb473c9d774918cf">DHT::readTemperature</a></div><div class="ttdeci">float readTemperature(bool S=false, bool force=false)</div><div class="ttdoc">Read temperature. </div><div class="ttdef"><b>Definition:</b> DHT.cpp:86</div></div>
<div class="ttc" id="class_interrupt_lock_html"><div class="ttname"><a href="class_interrupt_lock.html">InterruptLock</a></div><div class="ttdoc">Class that defines Interrupt Lock Avaiability. </div><div class="ttdef"><b>Definition:</b> DHT.h:98</div></div>
<div class="ttc" id="class_d_h_t_html_a5f8c84378abe4eeecf34f09e2cdf90a0"><div class="ttname"><a href="class_d_h_t.html#a5f8c84378abe4eeecf34f09e2cdf90a0">DHT::readHumidity</a></div><div class="ttdeci">float readHumidity(bool force=false)</div><div class="ttdoc">Read Humidity. </div><div class="ttdef"><b>Definition:</b> DHT.cpp:149</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>