I’m using Arduino IDE 1.8.12 in Windows 10 / 64. Board Generic ESP8266 Module.
I’ve extended the firmware presented by Rui Santos for the Sonoff.
I added a timer functionality to count down and turn off after an interval.
The complete code (except SSID/PW) is attached in “Sonoff_local_web_server1_fan - Copy.ino”
I have a Sonoff module I bought a couple of years ago. It has 5 pins for serial interfacing, with pin 1 closest to the reset button:
1: Vcc 3.3V
Like this one
I purchased some additional units last month. They have four pins for serial interfacing, with pin 1 closest to the reset button:
1: Vcc 3.3V
Like this one:
I connected the new unit to the FTDI USB/Serial programming cable to check it out, and the sketch compiled and ran properly.
Today, I wanted to program the older unit with the latest sketch. I uploaded the same sketch to the original unit. The segment sizes and other details during the upload process are identical.
However, the older Sonoff stops working after a few seconds. The serial monitor shows the normal output:
IP address: 192.168.1.104
MDNS responder started
HTTP server started
There is never any response from a browser.
I can ping at 192.168.1.104, and a few pings respond, then all timeouts.
Apparently the code is failing, but everything appears to be identical other than the board layout.
The original unit used to work fine with this code before I started testing with the newer units.
I have attached the IDE Upload log for both units. There is a slight difference:
Newer unit that works:
Chip is ESP8285 Features: WiFi, Embedded Flash
Older unit that fails:
Chip is ESP8266EX Features: WiFi
I can confirm that the unit that is now failing was working properly a few weeks ago.
Sonoff_local_web_server1_fan - Copy.ino (5.57 KB)