You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, the code works for me, but i measure around 24-25 Celsius, but there is only 18 degress here. I use 3.3V supply(but i also tried with 5V) and a 10k resistor between data and VCC.
What can I do?
board: ESP32 DEVKIT C
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.19
Hello, the code works for me, but i measure around 24-25 Celsius, but there is only 18 degress here. I use 3.3V supply(but i also tried with 5V) and a 10k resistor between data and VCC.
What can I do?
board: ESP32 DEVKIT C
Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.19
CODE:
#include <DHT.h>
#define DHTPIN 4
#define DHTTYPE DHT22
DHT dht(DHTPIN, DHTTYPE);
float h = 0;
float t = 0;
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
if (isnan(h)) {
Serial.println("Failed to read Humidity from DHT sensor!");
return;
}
if (isnan(t)) {
Serial.println("Failed to read celsius from DHT sensor!");
return;
}
h= dht.readHumidity();
t= dht.readTemperature();
Serial.print(F("Humidity: "));
Serial.print(h);
Serial.print("°% ");
Serial.print(F("Temperature: "));
Serial.print(t);
Serial.println("°C ");
delay(3000);
}
The text was updated successfully, but these errors were encountered: