I'm trying to simply connect my NodeMCU ESP8226 to my WiFi. I'm running the following code:
#include <WiFi.h>
// WiFi Settings
char ssid[] = "wifinetwork";
char pass[] = "admin";
void setup(){
Serial.begin(115200);
WiFi.disconnect();
Serial.println("================= S T AR T I N G ==============");
WiFi.begin(ssid,pass);
while(!(WiFi.status() == WL_CONNECTED)){
Serial.print("...");
}
Serial.println("==== I AM CONNECTED TO THE WIFI ==== ");
Serial.println("Your IP is: ");
Serial.println(WiFi.localIP());
}
void loop(){
}
When I run this, I'm promted with the following:
ets Jan 8 2013,rst cause:4, boot mode:(1,0)
wdt reset
Now, I've tried adding delays pretty much everywhere, installing drivers again and restarting my PC, unplugging, replugging, nothing fixes this. My NodeMCU is connected directly to my USB Port, which apperently shouldn't be an issue.
Can anyone help me out?