Browse Source

correct Gosund WP3 LED documentation and provide reasonable default actions (#2200)

* correct Gosund WP3 led color documentation; provide reasonable default actions for button and the two LEDs

* reverse red/blue led roles, as requested, to be consistent with other existing products

Co-authored-by: ziggurat29 <xxx@yyy.zzz>
mcspr-patch-1
ziggurat29 4 years ago
committed by GitHub
parent
commit
e2e0409c59
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 2 deletions
  1. +16
    -2
      code/espurna/config/hardware.h

+ 16
- 2
code/espurna/config/hardware.h View File

@ -3248,8 +3248,8 @@
// GPIO2 via test points on the back of the module) // GPIO2 via test points on the back of the module)
// and these are wired to devices: // and these are wired to devices:
// GPIO4: /BTN // GPIO4: /BTN
// GPIO12: /LED blue
// GPIO13: /LED red
// GPIO12: /LED red
// GPIO13: /LED blue
// GPIO14: RELAY // GPIO14: RELAY
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
@ -3262,17 +3262,31 @@
// Buttons // Buttons
#define BUTTON1_PIN 4 #define BUTTON1_PIN 4
#define BUTTON1_CONFIG BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH #define BUTTON1_CONFIG BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
// the defaults are reasonable, but you can change them as desired
//#define BUTTON1_PRESS BUTTON_ACTION_NONE
//#define BUTTON1_CLICK BUTTON_ACTION_TOGGLE
//#define BUTTON1_DBLCLICK BUTTON_ACTION_AP
//#define BUTTON1_LNGCLICK BUTTON_ACTION_RESET
//#define BUTTON1_LNGLNGCLICK BUTTON_ACTION_FACTORY
// Relays // Relays
#define RELAY1_PIN 14 #define RELAY1_PIN 14
#define RELAY1_TYPE RELAY_TYPE_NORMAL #define RELAY1_TYPE RELAY_TYPE_NORMAL
// LEDs // LEDs
// LED1 (red) indicates on/off state; you could use LED_MODE_FOLLOW_INVERSE
// so that the LED lights the button when 'off' so it can be found easily.
#define LED1_PIN 12 #define LED1_PIN 12
#define LED1_PIN_INVERSE 1 #define LED1_PIN_INVERSE 1
#define LED1_MODE LED_MODE_FOLLOW
#define LED1_RELAY 1
// LED2 (blue) indicates wifi activity
#define LED2_PIN 13 #define LED2_PIN 13
#define LED2_PIN_INVERSE 1 #define LED2_PIN_INVERSE 1
#define LED2_MODE LED_MODE_WIFI
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Several boards under different names uing a power chip labelled BL0937 or HJL-01 // Several boards under different names uing a power chip labelled BL0937 or HJL-01


Loading…
Cancel
Save