- #include <dht.h>
- dht DHT;
- #define DHTPIN 3 // Pin where the DHT11 is connected
- void setup() {
- Serial.begin(9600);
- }
- void loop() {
- int chk = DHT.read11(DHTPIN);
- Serial.print("Temperature = ");
- Serial.print(DHT.temperature);
- Serial.println(" *C");
- Serial.print("Humidity = ");
- Serial.print(DHT.humidity);
- Serial.println(" %");
- delay(2000); // Wait for 2 seconds before reading again
- }
[text] So
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new: