diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 8afae580e..fa59bb06d 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2347,7 +2347,7 @@ void GpioInit() if (mpin) pin[mpin] = i; } - if (2 == pin[GPIO_TXD]) Serial.set_tx(2); + if ((2 == pin[GPIO_TXD]) || (H801 == Settings.module)) Serial.set_tx(2); analogWriteRange(Settings.pwm_range); // Default is 1023 (Arduino.h) analogWriteFreq(Settings.pwm_frequency); // Default is 1000 (core_esp8266_wiring_pwm.c) diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 8d3fac176..f2fe93003 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -550,8 +550,8 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { { "H801", // Lixada H801 Wifi (ESP8266) GPIO_USER, // GPIO00 E-FW Button GPIO_LED1, // GPIO01 Green LED - GPIO_TXD, // GPIO02 RX - Pin next to TX on the PCB - GPIO_RXD, // GPIO03 TX - Pin next to GND on the PCB + GPIO_USER, // GPIO02 RX and Optional sensor - Pin next to TX on the PCB + GPIO_USER, // GPIO03 TX and Optional sensor - Pin next to GND on the PCB GPIO_PWM5, // GPIO04 W2 - PWM5 GPIO_LED2_INV, // GPIO05 Red LED 0, 0, 0, 0, 0, 0, // Flash connection @@ -1019,4 +1019,4 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { } */ -#endif // _SONOFF_TEMPLATE_H_ \ No newline at end of file +#endif // _SONOFF_TEMPLATE_H_