#include <ESP8266WiFi.h> #include <DHT.h> //////////////////////////////////////////////////////////////////////////////////////////////////////////// #define DHTPIN 2 // what pin we’re connected to String apiKey = "yourAPIKey"; //API key from ThingSpeak channel const char* ssid = "WifiSSID"; //SSID of your wifi const char* password = "password123"; //password of your wifi int duration=5;//delay between each data measure and uploading //////////////////////////////////////////////////////////////////////////////////////////////////////////// const char* server = "api.thingspeak.com"; DHT dht(DHTPIN, DHT11, 15);// Start DHT sensor WiFiClient client; //Start clinet void setup() { Serial.begin(115200); dht.begin(); WiFi.begin(ssid, password); Serial.println(); Serial.println(); Serial.print("Connecting to "); Serial.println(ssid); WiFi.begin(ssid, password); while (WiFi.status() !...
Share projects and codes I have done with Arduino, microcontrollers, DRV8825, Esp8266, stepper motors and Internet of things(IoT).