2

I am setting up a simple WiFi client for testing. but every time I try to upload and connect my NodeMCU, I get this error/soft reset message in Serial Monitor in Arduino IDE:

TEST

Soft WDT reset

>>>stack>>>

ctx: cont
sp: 3ffffdf0 end: 3fffffc0 offset: 01b0
3fffffa0:  feefeffe 00000000 3ffee59c 40203d30  
3fffffb0:  feefeffe feefeffe 3ffe8508 401009a5  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(1,6)


 ets Jan  8 2013,rst cause:4, boot mode:(1,6)

wdt reset

I tried different MCU boards and cables to make sure hardware and connections are functioning, I tried resetting and flash reset. I tried with or without "WiFiClient client;" in the code

this is my code:

#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>

//WiFi Settings
const char ssid[] = "SVwifi";
const char password[] = "tech1234";
WiFiClient client;

void setup() {
  Serial.begin(115200);
  Serial.println("TEST");

  //connect to wifi
  WiFi.begin(ssid, password);  

  while (WiFi.status() != WL_CONNECTED);
  {
    Serial.print(". ");
    delay(500);
  }
  //Test connection
  Serial.println("You are connected :)");
}
Kentaro Okuda
  • 1,557
  • 2
  • 12
  • 16
Salva
  • 21
  • 1
  • Most of the WDT resets I have seen so far were caused by long running Loops without yield/delay ... but your code looks ok ... are you sure you posted the correct sketch? – PrfctByDsgn Apr 02 '19 at 10:29
  • Reason might also be the power supply ... maybe you should try an USB Hub with power adapter ... – PrfctByDsgn Apr 02 '19 at 10:37
  • Is this your complete code? There is no `void loop() { }` for example. – Finn Apr 02 '19 at 17:38

1 Answers1

1

One important request, is to have a stable power source 3.3V with ~500mA

A lot of people who start with the ESP8266, or any other module without an onboard 3.3v regulator, don't know how demanding the ESP8266 is on the power source. It needs to have a stable 500mA capacity for it to work reliably. Also the regulator must be electrically close to the module. Using long connecting wires is one problem I see often.

The ESP8266 could have enough power to get programmed correctly but when it comes to transmitting it will draw a lot more current and if the power supply is insufficient a voltage dip occurs and then unpredictable behaviour occurs.

Dorin
  • 1,016
  • 1
  • 11
  • 15