forked from tamntn/aquagrow-esp32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sp-esp32.ino
48 lines (36 loc) · 911 Bytes
/
sp-esp32.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "DHTesp.h"
#include "config.h"
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include <BH1750.h>
#include <WiFi.h>
#include <HTTPClient.h>
#include <ArduinoJson.h>
DHTesp dht;
BH1750 lightMeter;
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
HardwareSerial Serial2(2);
float lux, wTemp, aTemp, hum;
float pH = 7;
//String pH ="";
String uWaterL = "false";
String lWaterL = "false";
String payload;
int freq = 5000;
int ledChannel = 0;
int resolution = 8;
String sensorstring = "";
boolean sensor_stringcomplete = false;
int getErrorCount = 0;
//////////////////////////////////////////////////
String command="";
int wPumpStatus =0;
int lightStatus = 0;
int heatStatus = 0;
int hPumpStatus = 0;
int ohPumpStatus = 0;
String wPumpInt = "0";
String lightInt = "0";
////////////////////////////////////////////////