[LPM] ESP8266 and DS1820 DeepSleep (#1591)

Add support for the ESP8266 deep sleep and required change for DS1820 sensor used in my project.

Allow defining DS1820_RESOLUTION and DS1820_INTERVAL_SEC in ENVIRON without editing config file.

Allow DTimeBetweenReadingmq2 Env. MACRO change without editing source config file.

Added some an example ENVIRONMENTS

Add ESP8266_DEEP_SLEEP_IN_US to nodemcuv2-all-test
This commit is contained in:
Die Peter Pan authored and GitHub committed 2023-04-09 17:03:13 -05:00
1 parent ac0215b5be
commit 4e51d9ec45
8 files changed
+113 -8

No files matched your search

+44
View File
@@ -125,3 +125,47 @@ build_flags =
board_build.flash_mode = dout
extra_scripts = scripts/compressFirmware.py
board_build.ldscript = eagle.flash.1m64.ld ;this frees more space for firmware uplad. Should also be uses for initial flash via serial
;Wemos D1 with an MQ2 flammable gas sensor at custom interval
[env:wemosd1-mq2-gas]
platform = ${com.esp8266_platform}
board = d1_mini
lib_deps =
${com-esp.lib_deps}
${libraries.wifimanager8266}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-UZmqttDiscovery' ; disables MQTT Discovery
; '-UZmqttDiscovery="HADiscovery"'
'-DvalueAsATopic=true' ; MQTT topic includes model and device
'-DGateway_Name="OpenMQTTGateway_MQ2_GAS"'
'-DZsensorMQ2="MQ2"'
'-DTimeBetweenReadingmq2=8000'
board_build.flash_mode = dout
custom_description = Gas flammable sensor gateway
custom_hardware = Gas flammable sensor first version
;ESP12E with an DS1820 waterproof temperature probe, custom interval, max temperature resolution and DEEP SLEEP to conserve battery power
[env:esp12e-ds18b20-deepsleep-pool]
platform = ${com.esp8266_platform}
board = esp12e
lib_deps =
${com-esp.lib_deps}
${libraries.wifimanager8266}
${libraries.esp8266_mdns}
${libraries.dallastemperature}
build_flags =
${com-esp.build_flags}
'-UZmqttDiscovery' ; disables MQTT Discovery
; '-UZmqttDiscovery="HADiscovery"'
'-DvalueAsATopic=true' ; MQTT topic includes model and device
'-DGateway_Name="OpenMQTTGatewayDS1820Pool"'
'-DZsensorDS1820="DS1820"'
'-DDS1820_OWBUS_GPIO=D2'
'-DESP8266_DEEP_SLEEP_IN_US=120000000'
'-DDS1820_RESOLUTION=12'
'-DDS1820_INTERVAL_SEC=15UL'
board_build.flash_mode = dout
custom_description = Pool temp sensor gateway
custom_hardware = Pool temp sensor first version