Browse Source

Fix and clean configuration for the Itead Studio 1CH inching board

fastled
Xose Pérez 7 years ago
parent
commit
f126ff12e1
2 changed files with 9 additions and 10 deletions
  1. +8
    -9
      code/espurna/config/hardware.h
  2. +1
    -1
      code/espurna/web.ino

+ 8
- 9
code/espurna/config/hardware.h View File

@ -170,26 +170,25 @@
#elif defined(ITEAD_1CH_INCHING) #elif defined(ITEAD_1CH_INCHING)
// Note: definitions for this board are based on third party data
// and have not been fully tested yet. If you have the chance to
// test them, please report back. Thank you.
// The inching functionality is managed by a misterious IC in the board.
// You cannot control the inching button and functionality from the ESP8266
// Besides, enabling the inching functionality using the hardware button
// will result in the relay switching on and off continuously.
// Fortunately the unkown IC keeps memory of the hardware inching status
// so you can just disable it and forget. The inching LED must be lit.
// You can still use the pulse options from the web interface
// without problem.
#define MANUFACTURER "ITEAD" #define MANUFACTURER "ITEAD"
#define DEVICE "1CH_INCHING" #define DEVICE "1CH_INCHING"
#define BUTTON1_PIN 0 #define BUTTON1_PIN 0
#define BUTTON1_RELAY 1 #define BUTTON1_RELAY 1
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON2_PIN 15
#define BUTTON2_CLICK BUTTON_MODE_PULSE
#define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define RELAY1_PIN 12 #define RELAY1_PIN 12
#define RELAY1_PIN_INVERSE 0 #define RELAY1_PIN_INVERSE 0
#define LED1_PIN 13 #define LED1_PIN 13
#define LED1_PIN_INVERSE 0 #define LED1_PIN_INVERSE 0
// Special LED that shows pulse mode status
#define LED_PULSE 14
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Electrodragon boards // Electrodragon boards
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 1
- 1
code/espurna/web.ino View File

@ -264,7 +264,7 @@ void _wsParse(uint32_t client_id, uint8_t * payload, size_t length) {
setCurrentRatio(getSetting("emonRatio").toFloat()); setCurrentRatio(getSetting("emonRatio").toFloat());
#endif #endif
#if ITEAD_1CH_INCHING
#if LED_PULSE
byte relayPulseMode = getSetting("relayPulseMode", String(RELAY_PULSE_MODE)).toInt(); byte relayPulseMode = getSetting("relayPulseMode", String(RELAY_PULSE_MODE)).toInt();
digitalWrite(LED_PULSE, relayPulseMode != RELAY_PULSE_NONE); digitalWrite(LED_PULSE, relayPulseMode != RELAY_PULSE_NONE);
#endif #endif


Loading…
Cancel
Save