Reset Wemos D1 Mini (actually ESP32) when connection lost

I adjusted your title (type of MCU can matter :slight_smile: ).

Here is one of my examples of reconnection code, the basics should work with any MCU)… And there are many others in this forum, just search for reconnection, etc.

As for actually resetting the MCU… the command ESP.restart(); is (in theory) the command to do a soft reset on ESP boards… but may not always be reliable, at least on my ESP32 projects. A very quick Google refresher shows others agree… Google for more info.