Chaotic misbehaviour with ESP8266WiFi.h and Arduino IDE
Posted: Sun Nov 12, 2017 5:13 pm
Hello there! I'm a newbie here, and concerning electronics in general, so please don't hesitate to tell me if I'm doing anything wrong. Also, I hope this is not a duplicate: I couldn't find any.
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
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
Code: Select all
// 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()
{
}