Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Electrodragon board #245

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions doc/HardwareElectrodragon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
BrewPiLess can run on [Electrodragon SDPT board](https://www.electrodragon.com/product/wifi-iot-relay-board-spdt-based-esp8266/). It uses ESP-12F, so you can deploy full nodemcuv2. Schematic is [available here](https://www.electrodragon.com/w/ESP_Relay_Board_SPDT).

For flashing, hold down btn2 before plugging in.


| ESP8266 GPIO | NodeMcu Label | Connect to |
| -------------- |:-------------:| :--------------------|
| GPIO5 | D1 | I2C SCL |
| GPIO4 | D2 | I2C SDA |
| GPIO0 | D3 | UP Button (BTN2) or flash |
| GPIO2 | D4 | DOWN Button (BTN1) |
| GPIO14 | D5 | Temperature Sensors * |
| GPIO12 | D6 | Cooling Actuator |
| GPIO13 | D7 | Heating Actuator |
| GPIO15 | D8 | Available |

*IO14 is marked as DHT on the board. It already has 10k pull-up resistor soldered correctly.

When configuring the devices, D6 and D7 should be configured as "Not inverted".

***
[Index](index.md)
1 change: 1 addition & 0 deletions doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* [Example#1](HardwareExample1.md)
* [SONOFF](HarddwareSONOFF.md)
* [Thorrax’s Board](https://github.com/thorrak/brewpi-esp8266)
* [Electrodragon](HardwareElectrodragon.md)
* [Localization of web frontend](LocalizationWebPage.md)
* [Flash layout and New Frontend](FlashLayoutAndNewUI.md)
* [Software Installation](SoftwareInstallation.md)
Expand Down
25 changes: 23 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

[platformio]
#sonoff OTA no longer supported
default_envs = classic, classic-spanish, classic-portuguese-br, classic-slovak, classic-tw, classic-it, newui, newui-tw, newui-spanish, newui-portuguese-br, newui-slovak, newui-oled, newui-it, thorrax, sonoff, sonoff-esp8285 , thorrax-classic, esp32, d1pro, d1pro-classic
;default_envs = esp8266dev

default_envs = classic, classic-spanish, classic-portuguese-br, classic-slovak, classic-tw, classic-it, newui, newui-tw, newui-spanish, newui-portuguese-br, newui-slovak, newui-oled, newui-it, thorrax, sonoff, sonoff-esp8285 , thorrax-classic, esp32, d1pro, d1pro-classic, electrodragon, electrodragon-classic
#default_envs = esp8266dev

[common_env_data]
lib_deps_external =
Expand Down Expand Up @@ -310,3 +311,23 @@ lib_deps = ${common_env_data.lib_deps_external_esp8266}
#build_flags = -Wl,-Tesp8266.flash.1m64.ld -DBOARD=Sonoff -DNO_SPIFFS -DUseClassicFrontEnd=true

#lib_deps = ${common_env_data.lib_deps_external_esp8266}

[env:electrodragon]
board_build.flash_mode = dout
platform = espressif8266@~2.2.0
board = nodemcuv2
framework = arduino
lib_extra_dirs = ./lib-esp8266
build_flags = -Wl,-Tesp8266.flash.4m2m.ld -DBOARD=Electrodragon_SPDT

lib_deps = ${common_env_data.lib_deps_external_esp8266}

[env:electrodragon-classic]
board_build.flash_mode = dout
platform = espressif8266@~2.2.0
board = nodemcuv2
framework = arduino
lib_extra_dirs = ./lib-esp8266
build_flags = -Wl,-Tesp8266.flash.4m2m.ld -DBOARD=Electrodragon_SPDT -DUseClassicFrontEnd=true

lib_deps = ${common_env_data.lib_deps_external_esp8266}
20 changes: 20 additions & 0 deletions src/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@
#define BrewShield 0
#define Sonoff 1
#define Thorrak_PCB 2
#define Electrodragon_SPDT 3

#ifndef BOARD
#define BOARD BrewShield
Expand Down Expand Up @@ -410,6 +411,25 @@
#define UpButtonPin NODEMCU_PIN_D3
#define DownButtonPin NODEMCU_PIN_D4

#elif BOARD == Electrodragon_SPDT

// builtin
#define coolingPin NODEMCU_PIN_D6 // IO12 - Relay1 - built-in
#define heatingPin NODEMCU_PIN_D7 // IO13 - Relay2 - built-in
#define UpButtonPin NODEMCU_PIN_D3 // IO0 - Btn2 - built-in
#define DownButtonPin NODEMCU_PIN_D4 // IO2 - Btn1 - built-in

// IO14 (marked DHT sometimes) already has a pull-up resistor
#define oneWirePin NODEMCU_PIN_D5 // IO14

// usable pins on electrodragon - IO05, IO04, IO15
// pins 9 and 10 should not be used
#define doorPin NODEMCU_PIN_D8
#define BuzzPin 10 //not really available, for compiling purposes




#else
#error "unknown board"
#endif
Expand Down