23 lines
365 B
C++
23 lines
365 B
C++
#include "DHT.h"
|
|
|
|
DHT dht;
|
|
|
|
void setup()
|
|
{
|
|
Serial.begin(9600);
|
|
dht.setup(3); // data pin 3
|
|
float humidity = dht.getHumidity();
|
|
float temperature = dht.getTemperature();
|
|
Serial.print(dht.getStatusString());
|
|
Serial.print("\t");
|
|
Serial.print(humidity, 1);
|
|
Serial.print("\t");
|
|
Serial.print(temperature, 1);
|
|
Serial.print("\n");
|
|
|
|
}
|
|
|
|
void loop()
|
|
{
|
|
|
|
}
|