Untitled
unknown
plain_text
a year ago
535 B
3
Indexable
#include "DHT.h" #include <WiFi.h> #define DHTPIN 4 #define DHTTYPE DHT22 DHT dht(DHTPIN, DHTTYPE); void setup() { // put your setup code here, to run once: Serial.begin(115200); dht.begin(); WiFi.mode(WIFI_MODE_STA); Serial.println(WiFi.macAddress()); } void loop() { delay(2000); double h = dht.readHumidity(); double t = dht.readTemperature(); Serial.print(F("Humidity: ")); Serial.print(h); Serial.print(F("% Temperature: ")); Serial.print(t); Serial.print(F("°C ")); }
Editor is loading...