Created
January 8, 2025 12:44
-
-
Save ProfAndreaPollini/8df2150d7a8de79d60589780c89f6832 to your computer and use it in GitHub Desktop.
arduino temperature reader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "DHT.h" | |
DHT dht(2,DHT11); | |
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(9600); | |
dht.begin(); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
float t = dht.readTemperature(); | |
Serial.println(t); | |
delay(1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment