Compare commits
No commits in common. "main" and "firmware_v0.1.3" have entirely different histories.
main
...
firmware_v
15 changed files with 24 additions and 8280 deletions
24
.gitmodules
vendored
24
.gitmodules
vendored
|
@ -1,24 +0,0 @@
|
||||||
[submodule "Arduino/CanGrow/Adafruit-GFX-Library"]
|
|
||||||
path = Arduino/CanGrow/Adafruit-GFX-Library
|
|
||||||
url = https://github.com/adafruit/Adafruit-GFX-Library
|
|
||||||
[submodule "Arduino/CanGrow/lib/Adafruit-GFX-Library"]
|
|
||||||
path = Arduino/CanGrow/lib/Adafruit-GFX-Library
|
|
||||||
url = https://github.com/adafruit/Adafruit-GFX-Library
|
|
||||||
[submodule "Arduino/CanGrow/lib/Adafruit_SSD1306"]
|
|
||||||
path = Arduino/CanGrow/lib/Adafruit_SSD1306
|
|
||||||
url = https://github.com/adafruit/Adafruit_SSD1306
|
|
||||||
[submodule "Arduino/CanGrow/lib/Adafruit_BME280_Library"]
|
|
||||||
path = Arduino/CanGrow/lib/Adafruit_BME280_Library
|
|
||||||
url = https://github.com/adafruit/Adafruit_BME280_Library/
|
|
||||||
[submodule "Arduino/CanGrow/lib/NTPClient"]
|
|
||||||
path = Arduino/CanGrow/lib/NTPClient
|
|
||||||
url = https://github.com/arduino-libraries/NTPClient
|
|
||||||
[submodule "Arduino/CanGrow/lib/Time"]
|
|
||||||
path = Arduino/CanGrow/lib/Time
|
|
||||||
url = https://github.com/PaulStoffregen/Time
|
|
||||||
[submodule "Arduino/CanGrow/lib/Adafruit_SHT31"]
|
|
||||||
path = Arduino/CanGrow/lib/Adafruit_SHT31
|
|
||||||
url = https://github.com/adafruit/Adafruit_SHT31/
|
|
||||||
[submodule "Arduino/CanGrow/lib/Adafruit_Sensor"]
|
|
||||||
path = Arduino/CanGrow/lib/Adafruit_Sensor
|
|
||||||
url = https://github.com/adafruit/Adafruit_Sensor
|
|
|
@ -4,12 +4,20 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
// set CANGROW_VER and CANGROW_BUILD if not already done as Compiler Flag
|
||||||
|
#ifndef CANGROW_VER
|
||||||
|
#define CANGROW_VER "0.0.0-dev"
|
||||||
|
#endif
|
||||||
|
#ifndef CANGROW_BUILD
|
||||||
|
#define CANGROW_BUILD "1a2b3c4-0000000000000"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Includes
|
* Includes
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Libraries internal (Arduino Core / ESP)
|
// Libraries
|
||||||
// https://github.com/arduino/ArduinoCore-avr/tree/master/libraries/SPI
|
// https://github.com/arduino/ArduinoCore-avr/tree/master/libraries/SPI
|
||||||
#include <SPI.h>
|
#include <SPI.h>
|
||||||
// https://github.com/arduino/ArduinoCore-avr/tree/master/libraries/Wire
|
// https://github.com/arduino/ArduinoCore-avr/tree/master/libraries/Wire
|
||||||
|
@ -23,40 +31,32 @@
|
||||||
#include <ESP8266WebServer.h>
|
#include <ESP8266WebServer.h>
|
||||||
// OTA update
|
// OTA update
|
||||||
#include <ESP8266HTTPUpdateServer.h>
|
#include <ESP8266HTTPUpdateServer.h>
|
||||||
|
|
||||||
// Libraries external
|
|
||||||
// https://github.com/adafruit/Adafruit-GFX-Library
|
// https://github.com/adafruit/Adafruit-GFX-Library
|
||||||
//include "lib/Adafruit-GFX-Library/Adafruit_GFX.h"
|
|
||||||
#include <Adafruit_GFX.h>
|
#include <Adafruit_GFX.h>
|
||||||
// https://github.com/adafruit/Adafruit_SSD1306
|
// https://github.com/adafruit/Adafruit_SSD1306
|
||||||
//include "lib/Adafruit_SSD1306/Adafruit_SSD1306.h"
|
|
||||||
#include <Adafruit_SSD1306.h>
|
#include <Adafruit_SSD1306.h>
|
||||||
// https://github.com/adafruit/Adafruit_Sensor
|
// https://github.com/adafruit/Adafruit_BME280_Library/
|
||||||
// include "lib/Adafruit_Sensor/Adafruit_Sensor.h"
|
|
||||||
#include <Adafruit_Sensor.h>
|
#include <Adafruit_Sensor.h>
|
||||||
// https://github.com/adafruit/Adafruit_BME280_Library
|
|
||||||
//include "lib/Adafruit_BME280_Library/Adafruit_BME280.h"
|
|
||||||
#include <Adafruit_BME280.h>
|
#include <Adafruit_BME280.h>
|
||||||
// https://github.com/adafruit/Adafruit_SHT31/
|
|
||||||
//#include "lib/Adafruit_SHT31/Adafruit_SHT31.h"
|
|
||||||
#include <Adafruit_SHT31.h>
|
|
||||||
// https://github.com/bblanchon/ArduinoJson
|
// https://github.com/bblanchon/ArduinoJson
|
||||||
#include "lib/ArduinoJson/ArduinoJson-v7.2.1.h"
|
#include <ArduinoJson.h>
|
||||||
// https://github.com/arduino-libraries/NTPClient
|
// https://github.com/arduino-libraries/NTPClient
|
||||||
//#include "lib/NTPClient/NTPClient.h"
|
|
||||||
#include <NTPClient.h>
|
#include <NTPClient.h>
|
||||||
// https://github.com/PaulStoffregen/Time
|
// https://github.com/PaulStoffregen/Time
|
||||||
//#include "lib/Time/TimeLib.h"
|
|
||||||
#include <TimeLib.h>
|
#include <TimeLib.h>
|
||||||
|
|
||||||
// DHT support dropped
|
// DHT support dropped
|
||||||
// https://github.com/adafruit/DHT-sensor-library
|
// https://github.com/adafruit/DHT-sensor-library
|
||||||
// #include "DHT.h"
|
// #include "DHT.h"
|
||||||
|
// SHT30/31
|
||||||
|
// https://github.com/adafruit/Adafruit_SHT31/
|
||||||
|
#include "Adafruit_SHT31.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CanGrow header files
|
* CanGrow header files
|
||||||
*/
|
*/
|
||||||
#include "CanGrow_Version.h"
|
|
||||||
#include "CanGrow_PinAssignments.h"
|
#include "CanGrow_PinAssignments.h"
|
||||||
#include "CanGrow_Init.h"
|
#include "CanGrow_Init.h"
|
||||||
#include "CanGrow_Logo.h"
|
#include "CanGrow_Logo.h"
|
||||||
|
|
|
@ -736,7 +736,6 @@ void controlPUMP() {
|
||||||
PumpOnManual = false;
|
PumpOnManual = false;
|
||||||
setOutput(3, 0);
|
setOutput(3, 0);
|
||||||
//digitalWrite(PinPUMP, LOW);
|
//digitalWrite(PinPUMP, LOW);
|
||||||
PumpLastOn = timeClient.getEpochTime();
|
|
||||||
EEPROM.put(237, PumpLastOn);
|
EEPROM.put(237, PumpLastOn);
|
||||||
EEPROM.commit(); //write to EEPROM
|
EEPROM.commit(); //write to EEPROM
|
||||||
PumpOnTimePassed = 0;
|
PumpOnTimePassed = 0;
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
/*
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Version
|
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CANGROW_VER "0.1.4"
|
|
||||||
// CANGROW_BUILD default dummy value if not set as Compiler Flag
|
|
||||||
#ifndef CANGROW_BUILD
|
|
||||||
#define CANGROW_BUILD "1a2b3c4-0000000000000"
|
|
||||||
#endif
|
|
|
@ -239,12 +239,6 @@ void SysMaintenance() {
|
||||||
} else {
|
} else {
|
||||||
body += "<div class='warnmsg'>💧 Cannot activate, <i>Pump mode</i> is set to <i>Off</i> in 🔆 Grow settings</div>";
|
body += "<div class='warnmsg'>💧 Cannot activate, <i>Pump mode</i> is set to <i>Off</i> in 🔆 Grow settings</div>";
|
||||||
}
|
}
|
||||||
} else if(webserver.hasArg("PumpOffManual")) {
|
|
||||||
// stooop
|
|
||||||
setOutput(3, 0);
|
|
||||||
PumpOnManual = false;
|
|
||||||
PumpOnTimePassed = 0;
|
|
||||||
body += "<div class='infomsg'>💧 Pump manual stopped</div>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -253,10 +247,11 @@ void SysMaintenance() {
|
||||||
body += "Dimm LED <a class='button' href='/system/maintenance?DimmOn=1'>⛅ On</a> <a class='button' href='/system/maintenance?DimmOff=1'>⏹️ Off</a><br><br><br>";
|
body += "Dimm LED <a class='button' href='/system/maintenance?DimmOn=1'>⛅ On</a> <a class='button' href='/system/maintenance?DimmOff=1'>⏹️ Off</a><br><br><br>";
|
||||||
body += "Pump manual <a class='button' href='/system/maintenance?PumpOnManual=1'>💧 Activate for ";
|
body += "Pump manual <a class='button' href='/system/maintenance?PumpOnManual=1'>💧 Activate for ";
|
||||||
body += PumpOnTime;
|
body += PumpOnTime;
|
||||||
body += "s</a> ";
|
body += "s</a><br>";
|
||||||
body += "<a class='button' href='/system/maintenance?PumpOffManual=1'>🛑 Stop manual</a><br>";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
body += FPSTR(HTMLfooter);
|
body += FPSTR(HTMLfooter);
|
||||||
webserver.send(200, "text/html", body);
|
webserver.send(200, "text/html", body);
|
||||||
}
|
}
|
||||||
|
@ -383,7 +378,7 @@ void WEBroot() {
|
||||||
body += returnStrDateFromEpoch(GrowStart);
|
body += returnStrDateFromEpoch(GrowStart);
|
||||||
body += "<br>\n";
|
body += "<br>\n";
|
||||||
body += "<b>Harvest date (est.): 🍂 </b> ";
|
body += "<b>Harvest date (est.): 🍂 </b> ";
|
||||||
body += returnStrDateFromEpoch(GrowStart + (60 * 60 * 24 * (DaysVeg + DaysBloom) ) );
|
body += returnStrDateFromEpoch(GrowStart + (60 * 60 * 24 * (DaysVeg + DaysVeg) ) );
|
||||||
body += "<br>\n";
|
body += "<br>\n";
|
||||||
body += "<b>Day of Grow: </b> ";
|
body += "<b>Day of Grow: </b> ";
|
||||||
if(DayNight == true) {
|
if(DayNight == true) {
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 372 KiB After Width: | Height: | Size: 291 KiB |
|
@ -1 +0,0 @@
|
||||||
Subproject commit d4720987895bc49bdb38beb9d3e288de8bd59078
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 9412f3d1a2e334a3415d79df706dad02925488aa
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 5e34a20df62371150f7cb10330919e9393b884b1
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 78d6a130b2045a8b7b76616da81603796757ed47
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 7b2473b6b24ae340f41685b5f5b2b90ad896db04
|
|
File diff suppressed because it is too large
Load diff
|
@ -1 +0,0 @@
|
||||||
Subproject commit 61684d4516839b579b81105be3447499c1417908
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit a18e50dcea4ee17285d732d39e7bc559482d1d3d
|
|
|
@ -3,8 +3,7 @@
|
||||||
|
|
||||||
test -z $TTY && TTY="/dev/ttyUSB0"
|
test -z $TTY && TTY="/dev/ttyUSB0"
|
||||||
test -z $IP && IP="192.168.4.20"
|
test -z $IP && IP="192.168.4.20"
|
||||||
|
test -z $VER && VER="0.1.3"
|
||||||
VER="$(grep "define CANGROW_VER" Arduino/CanGrow/CanGrow_Version.h | cut -d \" -f2 |sed -e 's/\"//g')"
|
|
||||||
BUILD="$(git rev-parse --short HEAD)-$(date '+%Y%m%d%H%M%S')"
|
BUILD="$(git rev-parse --short HEAD)-$(date '+%Y%m%d%H%M%S')"
|
||||||
|
|
||||||
ACLI="$HOME/.local/bin/arduino-cli"
|
ACLI="$HOME/.local/bin/arduino-cli"
|
||||||
|
@ -75,8 +74,7 @@ case $1 in
|
||||||
check_acli
|
check_acli
|
||||||
echo ":: Building firmware $VER $BUILD, target dir: $(pwd)/build/"
|
echo ":: Building firmware $VER $BUILD, target dir: $(pwd)/build/"
|
||||||
test -d build || mkdir build
|
test -d build || mkdir build
|
||||||
${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --build-property "build.extra_flags=-DCANGROW_BUILD=\"${BUILD}\"" --output-dir build/ || exit 1
|
${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --build-property "build.extra_flags=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" --output-dir build/ || exit 1
|
||||||
#${ACLI_CMD} --no-color compile -b ${BOARD} "Arduino/CanGrow/CanGrow.ino" --build-property "build.extra_flags=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" --output-dir build/ || exit 1
|
|
||||||
cp build/CanGrow.ino.bin build/CanGrow_v${VER}_${BUILD}.bin
|
cp build/CanGrow.ino.bin build/CanGrow_v${VER}_${BUILD}.bin
|
||||||
;;
|
;;
|
||||||
u|upload)
|
u|upload)
|
||||||
|
|
Loading…
Reference in a new issue