diff --git a/Arduino/CanGrow/CanGrow.ino b/Arduino/CanGrow/CanGrow.ino
index 6ef6c52..a874db7 100644
--- a/Arduino/CanGrow/CanGrow.ino
+++ b/Arduino/CanGrow/CanGrow.ino
@@ -6,7 +6,7 @@
// set CANGROW_VER and CANGROW_BUILD if not already done as Compiler Flag
#ifndef CANGROW_VER
- #define CANGROW_VER "v0.0.0-dev"
+ #define CANGROW_VER "0.0.0-dev"
#endif
#ifndef CANGROW_BUILD
#define CANGROW_BUILD "1a2b3c4-0000000000000"
diff --git a/Arduino/CanGrow/CanGrow_Init.h b/Arduino/CanGrow/CanGrow_Init.h
index 74de3d1..50d6c83 100644
--- a/Arduino/CanGrow/CanGrow_Init.h
+++ b/Arduino/CanGrow/CanGrow_Init.h
@@ -20,12 +20,20 @@ const bool APhidden = false;
// valSoilmoisture - contains the value of getSoilmoisture()
unsigned short valSoilmoisture;
+// helper variable for pump control with soilmoisture
+// average of last readings
+unsigned short valSoilmoistureAvg = 0;
+unsigned short valSoilmoistureAvg_tmp = 0;
+byte valSoilmoistureAvg_count = 0;
+short valSoilmoistureRaw;
+
// valTemperature - contains the value of getTemperature()
float valTemperature;
// valTemperature - contains the value of getHumidity()
float valHumidity;
// valWaterlevel - contains the value of getWaterlevel()
byte valWaterlevel;
+
// do we need a restart? (e.g. after wifi settings change)
bool NeedRestart;
bool FirstRun;
@@ -49,12 +57,7 @@ unsigned long MaintenanceStarted = 0;
byte PumpOnTimePassed = 0;
bool PumpOnManual = false;
-// helper variable for pump control with soilmoisture
-// average of last readings
-unsigned short valSoilmoistureAvg = 0;
-unsigned short valSoilmoistureAvg_tmp = 0;
-byte valSoilmoistureAvg_count = 0;
-//unsigned short
+
/*
* millis timer
diff --git a/Arduino/CanGrow/CanGrow_Sensors.h b/Arduino/CanGrow/CanGrow_Sensors.h
index 0b5e001..1399d23 100644
--- a/Arduino/CanGrow/CanGrow_Sensors.h
+++ b/Arduino/CanGrow/CanGrow_Sensors.h
@@ -203,7 +203,7 @@ int getSoilmoisture(byte moistureSensor, bool returnRAW = false) {
digitalWrite(PINsoilmoisture, HIGH);
// wait a bit to let the circuit stabilize
- delay(50);
+ //delay(50);
// get analog input value
// get values 10 times and get the middle for more precise data
diff --git a/Arduino/CanGrow/CanGrow_SysFunctions.h b/Arduino/CanGrow/CanGrow_SysFunctions.h
index 481b0c9..faf7e90 100644
--- a/Arduino/CanGrow/CanGrow_SysFunctions.h
+++ b/Arduino/CanGrow/CanGrow_SysFunctions.h
@@ -567,6 +567,7 @@ void refreshSensors() {
byte soilmoistureAvgSampleCount = 5;
valSoilmoisture = getSoilmoisture(MoistureSensor_Type);
+ valSoilmoistureRaw = getSoilmoisture(MoistureSensor_Type, true);
valHumidity = getHumidity(HumiditySensor_Type);
valTemperature = getTemperature(TemperatureSensor_Type);
valWaterlevel = getWaterlevel();
diff --git a/Arduino/CanGrow/CanGrow_WebFunctions.h b/Arduino/CanGrow/CanGrow_WebFunctions.h
index 1c3976b..2e16cbd 100644
--- a/Arduino/CanGrow/CanGrow_WebFunctions.h
+++ b/Arduino/CanGrow/CanGrow_WebFunctions.h
@@ -210,15 +210,26 @@ void Syslogout() {
void SysMaintenance() {
String body = returnHTMLheader();
- if( (webserver.hasArg("DimmOn")) ) {
- MaintenanceMode = true;
- MaintenanceStarted = millis();
- body += "
⏸️ Dimm LED On for ";
- body += MaintenanceDuration;
- body += "s
";
- } else if (webserver.hasArg("DimmOff")){
- MaintenanceMode = false;
- body += "
⏸️ Dimm LED Off
";
+ // when requesting to handle Dimming
+ if( (webserver.hasArg("DimmOn")) || (webserver.hasArg("DimmOff")) ) {
+ // check first if PWM is disabled / relais is used
+ if(UseLEDrelais == true) {
+ // if not, do it
+ if( (webserver.hasArg("DimmOn")) ) {
+ MaintenanceMode = true;
+ MaintenanceStarted = millis();
+ body += "
⛅ Dimm LED On for ";
+ body += MaintenanceDuration;
+ body += "s
";
+ body += "Pump manual 💧 Activate for ";
body += PumpOnTime;
body += "s ";
@@ -523,26 +534,24 @@ void WEBgrowSettings() {
-
+ body += "Grow duration ";
body += "Vegetation duration: days \n";
+ body+= "' required> Days \n";
body += "Bloom duration: days
\n";
+ body+= "' required> Days
\n";
-
- body += "Time LED ON vegetation: hours \n";
+ body+= "' required> Hours \n";
- body += "Time LED ON bloom: hours
1: Water every few days. \
+2: Water if the soil moisture falls below Soilmoisture low value \
+3: Water every few days if the soil moisture falls below Soilmoisture low value.
\n";
+
+ // TODO ugly. can this done be better?
+ // PumpOnTime int
+ body += "Pump ON time: Seconds \n";
+
+ // SoilmoistureLow byte
+ body += "Soilmoisture low: % \n";
+
+
+
+
+
+
+
body += "Pump interval vegetation: every days \n";
+ body += "' required> Days \n";
body += "Pump interval bloom: every days \n";
+ body += "' required> Days
\n";
body += "\n";
@@ -657,23 +703,23 @@ void WEBsystemSettings() {
// OutputInvert bool
body += "Invert Outputs: \n";
body += "
When using CanGrow PCB v0.6, set to Yes
\n";
// UseLEDrelais bool
body += "Use relais for LED (disable PWM): \n";
// UseFANrelais bool
body += "Use relais for FAN1 (disable PWM):
\n";
- body += "Pump configuration ";
-
- // PumpMode byte
- body += "Pump mode:
1: Water every few days. \
-2: Water if the soil moisture falls below Soilmoisture low value \
-3: Water every few days if the soil moisture falls below Soilmoisture low value.
\n";
-
- // TODO ugly. can this done be better?
- // PumpOnTime int
- body += "Pump ON time: Seconds \n";
-
- // SoilmoistureLow byte
- body += "Soilmoisture low: %
\n";
-
-
body += "General configuration ";
// NtpOffset int
- body += "NTP offset: Hours \n";
@@ -782,7 +803,7 @@ void WEBsystemSettings() {
body += "ESP32-Cam IP (optional): \n";
+ body += "' >
\n";
body += "\n";
@@ -851,7 +872,7 @@ void WEBwifiSettings() {
body += "IP: \n";
body += "Subnet mask: \n";
body += "Gateway: \n";
- body += "DNS: \n";
+ body += "DNS: