This said, I am working on Arduino IDE to connect to NodeMCU; my problem is about ESP8266WiFi.h, which I can get to work in #CODE1, but everything breaks out when I try even to comment an empty line! Sometimes I can't even get it back to working, by uncommenting.
I honestly can't figure out what's wrong, maybe some IDE-NodeMCU misunderstanding? Please tell me if some extra information is needed: as I said, I'm quite a newbie here...
Thanks a lot for your help! :)
#CODE1
// CONFIGURE WIFI
#include "ESP8266WiFi.h"
const char *ssid = "xxxxxxx";
const char *pass = "xxxxxxx";
void setup()
{
delay(1000);
Serial.begin(9600);
Serial.println("BEGIN CONNECTION");
//SETUP WIFI
Serial.println("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("WiFi connected");
}
void loop()
{
}