From df1b25f381459d94ff40773747302d095b828cc3 Mon Sep 17 00:00:00 2001 From: srg74 <28492985+srg74@users.noreply.github.com> Date: Fri, 3 Jan 2020 23:46:00 -0500 Subject: [PATCH 1/3] Added ESP8266 ESP-07 module with external antenna Added 2 library dependency for temperature sensor --- platformio.ini | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 45f2148fe..9d96bf4ca 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,6 +10,7 @@ lib_dir = ./wled00/src ; env_default = nodemcuv2 ; env_default = esp01 ; env_default = esp01_1m +; env_default = esp07 ; env_default = d1_mini ; env_default = esp32dev ; env_default = esp8285_4CH_MagicHome @@ -43,7 +44,9 @@ lib_deps_external = #Timezone@1.2.1 #For use SSD1306 0.91" OLED display uncomment following #U8g2@~2.27.2 - + #For Dallas sensor uncomment following 2 lines + #DallasTemperature@~3.8.0 + #OneWire@~2.3.5 [common:esp8266] # ------------------------------------------------------------------------------ # PLATFORM: @@ -156,6 +159,18 @@ build_flags = lib_deps = ${common.lib_deps_external} +[env:esp07] +board = esp07 +platform = ${common:esp8266.platform} +monitor_speed = ${common.monitor_speed} +upload_speed = ${common.upload_speed} +framework = ${common.framework} +build_flags = + ${common.build_flags} + ${common:esp8266.build_flags} +lib_deps = + ${common.lib_deps_external} + # see: http://docs.platformio.org/en/latest/platforms/espressif32.html [env:esp32dev] board = esp32dev From 750261d2058e769ac93936277838031137c883cf Mon Sep 17 00:00:00 2001 From: srg74 <28492985+srg74@users.noreply.github.com> Date: Sun, 5 Jan 2020 14:47:31 -0500 Subject: [PATCH 2/3] Turn off display after 5 min. Better shut off display after few minutes to preserve display life time. --- usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino b/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino index 593625b91..cef01cddf 100644 --- a/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino +++ b/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino @@ -39,6 +39,8 @@ uint8_t knownMode = 0; uint8_t knownPalette = 0; long lastUpdate = 0; +long startupTimestamp = millis(); +bool displayTurnedOff = false; // How often we are redrawing screen #define USER_LOOP_REFRESH_RATE_MS 5000 @@ -49,6 +51,11 @@ void userLoop() { return; } lastUpdate = millis(); +// Turn off display after 5 minutes from powering. + if( !displayTurnedOff && millis() - startupTimestamp > 5*60*1000) { + u8x8.setPowerSave(1); + displayTurnedOff = true; + } // Check if values which are shown on display changed from the last tiem. if ((apActive == true ? String(apSSID) : WiFi.SSID()) != knownSsid) { From 78f301d5035cb2ea4857ddba19f5f64339b1f9bb Mon Sep 17 00:00:00 2001 From: cschwinne Date: Mon, 6 Jan 2020 01:21:16 +0100 Subject: [PATCH 3/3] Removed verbose option from travis --- .travis.yml | 2 +- .../ssd1306_i2c_oled_u8g2/wled06_usermod.ino | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c4408c4cb..5d9762615 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,4 +32,4 @@ install: - pip install -U platformio - platformio update script: - - platformio ci --project-conf=./platformio.ini -v + - platformio ci --project-conf=./platformio.ini diff --git a/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino b/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino index cef01cddf..03642a54c 100644 --- a/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino +++ b/usermods/ssd1306_i2c_oled_u8g2/wled06_usermod.ino @@ -39,7 +39,7 @@ uint8_t knownMode = 0; uint8_t knownPalette = 0; long lastUpdate = 0; -long startupTimestamp = millis(); +long lastRedraw = 0; bool displayTurnedOff = false; // How often we are redrawing screen #define USER_LOOP_REFRESH_RATE_MS 5000 @@ -51,14 +51,15 @@ void userLoop() { return; } lastUpdate = millis(); -// Turn off display after 5 minutes from powering. - if( !displayTurnedOff && millis() - startupTimestamp > 5*60*1000) { + + // Turn off display after 3 minutes with no change. + if(!displayTurnedOff && millis() - lastRedraw > 3*60*1000) { u8x8.setPowerSave(1); displayTurnedOff = true; } - // Check if values which are shown on display changed from the last tiem. - if ((apActive == true ? String(apSSID) : WiFi.SSID()) != knownSsid) { + // Check if values which are shown on display changed from the last time. + if (((apActive) ? String(apSSID) : WiFi.SSID()) != knownSsid) { needRedraw = true; } else if (knownIp != (apActive ? IPAddress(4, 3, 2, 1) : WiFi.localIP())) { needRedraw = true; @@ -74,6 +75,13 @@ void userLoop() { return; } needRedraw = false; + + if (displayTurnedOff) + { + u8x8.setPowerSave(0); + displayTurnedOff = false; + } + lastRedraw = millis(); // Update last known values. #if defined(ESP8266)