There are two commands which can help prevent a watchdog reset.

  1. delay()
  2. yield()

These commands allow the ESP8266 to perform internal routines while the user commands are waiting for some action. If the internal routines are not executed on time the watchdog is triggered.