arduino-DHT-master
所属分类:单片机开发
开发工具:C++ Builder
文件大小:42KB
下载次数:1
上传日期:2017-11-29 16:02:21
上 传 者:
mand
说明: arduino buledert good condition for every thing
文件列表:
DHT.cpp (4637, 2013-08-26)
DHT.h (2368, 2013-08-26)
examples (0, 2013-08-26)
examples\DHT_Test (0, 2013-08-26)
examples\DHT_Test\DHT_Test.pde (547, 2013-08-26)
keywords.txt (904, 2013-08-26)
license.txt (1561, 2013-08-26)
DHT
===
An Arduino library for reading the DHT family of temperature and humidity sensors.
Written by Mark Ruys,
.
Features
--------
- Support for DHT11 and DHT22, AM2302, RHT03
- Auto detect sensor model
- Low memory footprint
- Very small code
Usage
-----
```
#include "DHT.h"
DHT dht;
void setup()
{
Serial.begin(9600);
dht.setup(2); // data pin 2
}
void loop()
{
delay(dht.getMinimumSamplingPeriod());
Serial.print(dht.getHumidity());
Serial.print("\t");
Serial.print(dht.getTemperature());
}
```
Also check out the [example] how to read out your sensor. For all the options, see [dht.h][header].
Installation
------------
Place the [DHT][download] library folder in your `/libraries/` folder. You may need to create the `libraries` subfolder if its your first library. Restart the Arduino IDE.
[download]: https://github.com/markruys/arduino-DHT/archive/master.zip "Download DHT library"
[example]: https://github.com/markruys/arduino-DHT/blob/master/examples/DHT_Test/DHT_Test.pde "Show DHT example"
[header]: https://github.com/markruys/arduino-DHT/blob/master/DHT.h "Show header file"
近期下载者:
相关文件:
收藏者: