Yes
And my setup is a 5V switchmode supply to drive a relay through a 2N2222, and reducing the voltage for the ESP with a AMS1117 to 3.3V. with a capacitor on the output.
I did disable DEBUG. But that's fantastic if debug works! So it seems like the whole freezing issue had to do with the faulty function then? I added a 1000uf capacitor also.
Thank you! I have been scratching my head as to why my modules have been dropping out regularly. I have now reprogrammed them - and so far they appear stable.
I have three modules.
Two of them are analog output modules (LED faders), they are now stable after inserting the MQTT subscribe in myConnectedCb().
The third is a Generic (AI, DI) input module, that publish temperature, humidity and luminosity at regular intervals. This module still freeze after inserting MQTT subscribe in myConnectedCb(). I believe the subscribe should be inserted elsewhere in an Input module.
I am now testing with MQTT subscribe in myPublishedCb(). Will report back if it works.
I hate to this but today, my ESP stopped responding again... I've had it online for maybe 4-5 days and today it stopped. I have connected the relay output pin to pin 5 which is the same as the blue led on the NodeMCU is connected to and the blue led is lit but the relay is off and I can't switch it on/off.
What about you guys, still online? My setup is, as I wrote earlier, a cheap 230V -> 3.3V charger from china which powers both the NodeMCU and the relay and I've added a 1000uf capacitor between 3.3V and ground. Debug is off and I have the new software.