ESP3D  3.0
Firmware for ESP boards connected to 3D Printer
dht.h
Go to the documentation of this file.
1 /*
2  dht.h - dht functions class
3 
4  Copyright (c) 2014 Luc Lebosse. All rights reserved.
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 
22 
23 #ifndef _DHT_H
24 #define _DHT_H
25 
26 class DHT
27 {
28 public:
29  DHT();
30  ~DHT();
31  bool begin();
32  void end();
33  void handle();
34  bool setInterval(uint interval);
35  uint interval();
36  uint8_t GetModel();
37  const char *GetModelString();
38  float getHumidity();
39  float getTemperature();
40  bool started();
41  bool isCelsiusUnit();
42  void setCelsiusUnit(bool set);
43 private:
44  bool _started;
45  bool _usecelsius;
46  uint32_t _interval;
47  uint32_t _lastReadTime;
48  float _temperature;
49  float _humidity;
50 };
51 
52 extern DHT esp3d_DHT;
53 
54 #endif //_DHT_H
55 
DHT::setInterval
bool setInterval(uint interval)
DHT::handle
void handle()
DHT::interval
uint interval()
DHT::started
bool started()
DHT::end
void end()
esp3d_DHT
DHT esp3d_DHT
DHT::GetModelString
const char * GetModelString()
DHT::begin
bool begin()
DHT::getHumidity
float getHumidity()
DHT::DHT
DHT()
DHT::getTemperature
float getTemperature()
DHT::setCelsiusUnit
void setCelsiusUnit(bool set)
DHT
Definition: dht.h:26
DHT::~DHT
~DHT()
DHT::GetModel
uint8_t GetModel()
DHT::isCelsiusUnit
bool isCelsiusUnit()