IoT BASED SMART IRRIGATION SYSTEM PROGRAM
#include <DHT.h> #include <ESP8266WiFi.h> String apiKey = "X5AQ3EGIKMBYW31H"; // Enter your Write API key here const char* server = "api.thingspeak.com"; const char *ssid = "CircuitLoop"; // Enter your WiFi Name const char *pass = "circuitdigest101"; // Enter your WiFi Password #define DHTPIN D3 // GPIO Pin where the dht11 is connected DHT dht(DHTPIN, DHT11); WiFiClient client; const int moisturePin = A0; // moisteure sensor pin const int motorPin = D0; unsigned long interval = 10000; unsigned long previousMillis = 0; unsigned long interval1 = 1000; unsigned long previousMillis1 = 0; float moisturePercentage; //moisture reading float h; // humidity reading float t; ...

Comments
Post a Comment