Browse Source

two new devices

new devices:
esp dht11 & ds18b20 boards

renamed flags to make more sense.
rfm69
gn0st1c 6 years ago
parent
commit
374e92be2a
7 changed files with 106 additions and 11 deletions
  1. +2
    -0
      README.md
  2. +4
    -2
      code/espurna/config/arduino.h
  3. +38
    -3
      code/espurna/config/hardware.h
  4. +10
    -2
      code/espurna/migrate.ino
  5. +52
    -4
      code/platformio.ini
  6. BIN
      images/devices/generic-dht11-10.jpg
  7. BIN
      images/devices/generic-ds18b20-10.jpg

+ 2
- 0
README.md View File

@ -239,6 +239,8 @@ Here is the list of supported hardware. For more information please refer to the
|**IKE ESPike**|**STM_RELAY**|**Arniex Swifitch**| |**IKE ESPike**|**STM_RELAY**|**Arniex Swifitch**|
|![Heltec Touch Relay](images/devices/heltec-touch-relay.jpg)|![Generic Relay v4.0](images/devices/generic-relay-40.jpg)|![Generic RGBLed v1.0](images/devices/generic-rgbled-10.jpg)| |![Heltec Touch Relay](images/devices/heltec-touch-relay.jpg)|![Generic Relay v4.0](images/devices/generic-relay-40.jpg)|![Generic RGBLed v1.0](images/devices/generic-rgbled-10.jpg)|
|**Heltec Touch Relay**|**Generic Relay v4.0**|**Generic RGBLed v1.0**| |**Heltec Touch Relay**|**Generic Relay v4.0**|**Generic RGBLed v1.0**|
|![Generic DHT11 v1.0](images/devices/generic-dht11-10.jpg)|![Generic DS18B20 v1.0](images/devices/generic-ds18b20-10.jpg)||
|**Generic DHT11 v1.0**|**Generic DS18B20 v1.0**||
**Other supported boards:** **Other supported boards:**
*TODO* *TODO*


+ 4
- 2
code/espurna/config/arduino.h View File

@ -72,8 +72,10 @@
//#define GREEN_ESP8266RELAY //#define GREEN_ESP8266RELAY
//#define IKE_ESPIKE //#define IKE_ESPIKE
//#define ARNIEX_SWIFITCH //#define ARNIEX_SWIFITCH
//#define GENERIC_ESP01SRELAY40
//#define GENERIC_ESP01SRGBLED10
//#define GENERIC_ESP01S_RELAY_V40
//#define GENERIC_ESP01S_RGBLED_V10
//#define GENERIC_ESP01S_DHT11_V10
//#define GENERIC_ESP01S_DS18B20_V10
//#define HELTEC_TOUCHRELAY //#define HELTEC_TOUCHRELAY
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------


+ 38
- 3
code/espurna/config/hardware.h View File

@ -1223,7 +1223,7 @@
#define RELAY1_TYPE RELAY_TYPE_NORMAL #define RELAY1_TYPE RELAY_TYPE_NORMAL
#define RELAY2_TYPE RELAY_TYPE_NORMAL #define RELAY2_TYPE RELAY_TYPE_NORMAL
// DB18B20
// DS18B20
#ifndef DALLAS_SUPPORT #ifndef DALLAS_SUPPORT
#define DALLAS_SUPPORT 1 #define DALLAS_SUPPORT 1
#endif #endif
@ -1829,7 +1829,7 @@
// https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180404024035&SearchText=esp-01s+relay // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180404024035&SearchText=esp-01s+relay
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#elif defined(GENERIC_ESP01SRELAY40)
#elif defined(GENERIC_ESP01S_RELAY_V40)
// Info // Info
#define MANUFACTURER "GENERIC" #define MANUFACTURER "GENERIC"
@ -1848,7 +1848,7 @@
// https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180404023816&SearchText=esp-01s+led+controller // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180404023816&SearchText=esp-01s+led+controller
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#elif defined(GENERIC_ESP01SRGBLED10)
#elif defined(GENERIC_ESP01S_RGBLED_V10)
// Info // Info
#define MANUFACTURER "GENERIC" #define MANUFACTURER "GENERIC"
@ -1866,6 +1866,41 @@
// LEDs // LEDs
#define LED1_PIN 2 #define LED1_PIN 2
// -----------------------------------------------------------------------------
// ESP-01S DHT11 v1.0
// https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180410105907&SearchText=esp-01s+dht11
// -----------------------------------------------------------------------------
#elif defined(GENERIC_ESP01S_DHT11_V10)
// Info
#define MANUFACTURER "GENERIC"
#define DEVICE "ESP01S_DHT11_10"
// DHT11
#ifndef DHT_SUPPORT
#define DHT_SUPPORT 1
#endif
#define DHT_PIN 2
// -----------------------------------------------------------------------------
// ESP-01S DS18B20 v1.0
// https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180410105933&SearchText=esp-01s+ds18b20
// -----------------------------------------------------------------------------
#elif defined(GENERIC_ESP01S_DS18B20_V10)
// Info
#define MANUFACTURER "GENERIC"
#define DEVICE "ESP01S_DS18B20_10"
// DB18B20
#ifndef DALLAS_SUPPORT
#define DALLAS_SUPPORT 1
#endif
#define DALLAS_PIN 2
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Heltec Touch Relay // Heltec Touch Relay
// https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180408043114&SearchText=esp8266+touch+relay // https://www.aliexpress.com/wholesale?catId=0&initiative_id=SB_20180408043114&SearchText=esp8266+touch+relay


+ 10
- 2
code/espurna/migrate.ino View File

@ -859,7 +859,7 @@ void migrate() {
setSetting("relayGPIO", 0, 5); setSetting("relayGPIO", 0, 5);
setSetting("relayType", 0, RELAY_TYPE_INVERSE); setSetting("relayType", 0, RELAY_TYPE_INVERSE);
#elif defined(GENERIC_ESP01SRELAY40)
#elif defined(GENERIC_ESP01S_RELAY_V40)
setSetting("board", 65); setSetting("board", 65);
setSetting("ledGPIO", 0, 2); setSetting("ledGPIO", 0, 2);
@ -867,7 +867,7 @@ void migrate() {
setSetting("relayGPIO", 0, 0); setSetting("relayGPIO", 0, 0);
setSetting("relayType", 0, RELAY_TYPE_NORMAL); setSetting("relayType", 0, RELAY_TYPE_NORMAL);
#elif defined(GENERIC_ESP01SRGBLED10)
#elif defined(GENERIC_ESP01S_RGBLED_V10)
setSetting("board", 66); setSetting("board", 66);
setSetting("ledGPIO", 0, 2); setSetting("ledGPIO", 0, 2);
@ -880,6 +880,14 @@ void migrate() {
setSetting("relayGPIO", 0, 12); setSetting("relayGPIO", 0, 12);
setSetting("relayType", 0, RELAY_TYPE_NORMAL); setSetting("relayType", 0, RELAY_TYPE_NORMAL);
#elif defined(GENERIC_ESP01S_DHT11_V10)
setSetting("board", 68);
#elif defined(GENERIC_ESP01S_DS18B20_V10)
setSetting("board", 69);
#else #else
// Allow users to define new settings without migration config // Allow users to define new settings without migration config


+ 52
- 4
code/platformio.ini View File

@ -1881,7 +1881,7 @@ board = esp01_1m
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01SRELAY40
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01S_RELAY_V40
monitor_baud = 115200 monitor_baud = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
@ -1892,7 +1892,7 @@ board = esp01_1m
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01SRELAY40
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01S_RELAY_V40
upload_speed = 115200 upload_speed = 115200
upload_port = "${env.ESPURNA_IP}" upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
@ -1905,7 +1905,7 @@ board = esp01_1m
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01SRGBLED10
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01S_RGBLED_V10
monitor_baud = 115200 monitor_baud = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
@ -1916,7 +1916,55 @@ board = esp01_1m
board_flash_mode = dout board_flash_mode = dout
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore} lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01SRGBLED10
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01S_RGBLED_V10
upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}
[env:generic-esp01s-dht11-10]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01S_DHT11_V10
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:generic-esp01s-dht11-10-ota]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01S_DHT11_V10
upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}
[env:generic-esp01s-ds18b20-10]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01S_DS18B20_V10
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:generic-esp01s-ds18b20-10-ota]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags_1m} -DGENERIC_ESP01S_DS18B20_V10
upload_speed = 115200 upload_speed = 115200
upload_port = "${env.ESPURNA_IP}" upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266


BIN
images/devices/generic-dht11-10.jpg View File

Before After
Width: 400  |  Height: 400  |  Size: 18 KiB

BIN
images/devices/generic-ds18b20-10.jpg View File

Before After
Width: 400  |  Height: 400  |  Size: 18 KiB

Loading…
Cancel
Save