Skip to content

Commit

Permalink
Merge pull request #1113 from ruimarinho/board/wemos-d1mini
Browse files Browse the repository at this point in the history
Add support for wemos-d1mini dev board
  • Loading branch information
xoseperez authored Aug 8, 2018
2 parents c6a38e9 + f312f92 commit 97617d8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/espurna/config/arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
//--------------------------------------------------------------------------------

//#define NODEMCU_LOLIN
//#define WEMOS_D1_MINI
//#define WEMOS_D1_MINI_RELAYSHIELD
//#define TINKERMAN_ESPURNA_H06
//#define TINKERMAN_ESPURNA_H08
Expand Down
20 changes: 20 additions & 0 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,26 @@
#define MANUFACTURER "NODEMCU"
#define DEVICE "BASIC"

#elif defined(WEMOS_D1_MINI)

// Info
#define MANUFACTURER "WEMOS"
#define DEVICE "D1_MINI"

// Buttons
// No buttons on the D1 MINI alone, but defining it without adding a button doen't create problems
#define BUTTON1_PIN 0 // Connect a pushbutton between D3 and GND,
// it's the same as using a Wemos one button shield
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1

// LEDs
#define LED1_PIN 2
#define LED1_PIN_INVERSE 1

#define I2C_SDA_PIN 4 // D2
#define I2C_SCL_PIN 5 // D1

#elif defined(WEMOS_D1_MINI_RELAYSHIELD)

// Info
Expand Down
12 changes: 12 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@ extra_scripts = ${common.extra_scripts}
# DEVELOPMENT BOARDS
# ------------------------------------------------------------------------------

[env:wemos-d1mini]
platform = ${common.platform}
framework = ${common.framework}
board = d1_mini
board_build.flash_mode = ${common.flash_mode}
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DWEMOS_D1_MINI -DDEBUG_FAUXMO=Serial -DNOWSAUTH
upload_speed = ${common.upload_speed_fast}
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}

[env:wemos-d1mini-relayshield]
platform = ${common.platform}
framework = ${common.framework}
Expand Down

0 comments on commit 97617d8

Please sign in to comment.