Nodemcu and DHT11 coding #include <dht.h> #include <AdafruitIO_WiFi.h> #include <ESP8266WiFi.h> #include <Ticker.h> #define DHT11_PIN 2 #define IO_USERNAME "*******"//replace your user name #define IO_KEY "***********" //replace your key #define WIFI_SSID "********"//replace your hotspot name #define WIFI_PASS "********"//replace your hotspot password AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS); dht DHT; AdafruitIO_Feed *humidity = io.feed("*******");//replace your feed1 name AdafruitIO_Feed *temperature = io.feed("*****");//replace your feed2 name void setup(){ Serial.begin(9600); Serial.println("DHT11 Humidity & temperature Sensor\n\n"); Serial.print("Connecting to Adafruit IO"); io.connect(); while(io.status() < AIO_CONNECTED) { S...
Posts
Showing posts from June, 2019