serverroom-components/pg-serverroom-monitor/dht/dht.ino

24 lines
365 B
Arduino
Raw Normal View History

2024-11-24 19:22:58 +00:00
#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()
{
}