Created
December 1, 2019 17:48
-
-
Save srmq/f09d0c69602aac9c96f3bbaedeedd4c5 to your computer and use it in GitHub Desktop.
Main file of the Intelligent Irrigator, available under the GPL v3+
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ArduinoJson.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <ESP8266mDNS.h> | |
#include <cmath> | |
#include "sensor_calibration.h" | |
#include "SensorTask.h" | |
#include "ServerTask.h" | |
#include "CloudTask.h" | |
#include "WiFiTask.h" | |
#include <Scheduler.h> | |
#include <WiFiUdp.h> | |
#include <NTPClient.h> | |
#include "FS.h" | |
#include <TimeLib.h> | |
#include <Time.h> | |
bool fsOpen = false; | |
void loop() { | |
Serial.println(F("WARNING: loop() was called")); | |
} | |
void setup() { | |
Serial.begin(115200); | |
delay(1000); | |
fsOpen = SPIFFS.begin(); | |
static SensorTask sensorTask; | |
static ServerTask serverTask; | |
static WiFiTask wiFiTask; | |
static CloudTask cloudTask; | |
Scheduler.start(&sensorTask); | |
Scheduler.start(&serverTask); | |
Scheduler.start(&wiFiTask); | |
Scheduler.start(&cloudTask); | |
Serial.println(F("SETUP")); | |
Scheduler.begin(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment