ESP8266 difference between ESP.reset() and ESP.restart()? - From https://www.pieterverhees.nl/sparklesagarbage/esp8266/130-difference-between-esp-reset-and-esp-restart
Both work, but sometimes the ESP does not start again.
ESP.reset() is a hard reset and can leave some of the registers in the old state which can lead to problems, its more or less like the reset button on the PC.
ESP.restart() tells the SDK to reboot, so its a more clean reboot, use this one if possible.
the boot mode:(1,7) problem is known and only happens at the first restart after serial flashing. if you do one manual reboot by power or RST pin all will work more info see: #1017