ESP8266 using Arduino IDE

Try just put something random in for your WiFi and password so that it doesn't connect. With a bit of luck you will just see a stream of dots in your serial monitor. If that works, change your SSID so that it does not contain spaces. I've seen instances of ESPs not liking spaces in the SSID.

I tried changing the SSID earlier today , but it didnt work , thanks a lot for your Help !

In boards manager are you using the latest esp8266 package (2.4.2)? If so, does a simple blink or helloworld sketch compile and run ok?

Yes I am, the Led Blink test works fine, the problem only comes when it comes to connecting to the WIFI .

Without being able to recreate your issue I'm fresh out of ideas I'm afraid... try another board maybe?

Works fine on a WeMos D1 mini after entering SSID and PW, even with the IDE set to NodeMCU 1.0.
I use my ESP boards with a baud rate of 74880, to see the module's startup data.
Leo..

vbshightime:
So avoid using delays() instead delays use millis() to create delay

Although the use of delay() should generally be avoided, delay() will not cause WDT reset in the ESP8266. If you create your own blocking delays (e.g. long while() loop) then it will indeed cause a WDT reset.

vbshightime:
if the situation still persists then you can try upgrading your firmware, get the new firmware from Espressif site.

CiscoFrancis is programming the ESP8266 directly. The sketch they posted IS the firmware.

Pinja:
Without being able to recreate your issue I'm fresh out of ideas I'm afraid... try another board maybe?

I will try that , it might be the board .

Wawa:
Works fine on a WeMos D1 mini after entering SSID and PW, even with the IDE set to NodeMCU 1.0.
I use my ESP boards with a baud rate of 74880, to see the module's startup data.
Leo..

So u are able to switch the LED on and OFF ?

Didn't try that, but the web page works and I don't have a crash-dump on the serial monitor.

Seen these crash dumps before while playing with ESPs and I made a programming mistake.
They always disappeared when I corrected the code.
Maybe there is some old code in there that didn't get wiped.
Try programming your NodeMCU with a different flash size, or run a sketch that wipes all of the memory.
Leo..

Hi Guys, Thanks a lot for your help , it turned out that the problem was with the WiFi board , I just got another one and uploaded the code onto it , and it worked .

My question now is : How to display the Ip address and the ( arguments (on/0ff) as I click on the respective buttons ) on a I2c LCD display and as if it was the serial monitor ?

CiscoFrancis:
it turned out that the problem was with the WiFi board

I wonder if the old board was damaged by connecting the LED with no current limiting resistor?

pert:
I wonder if the old board was damaged by connecting the LED with no current limiting resistor?

It is very unlikely for that to happen, the current might damage the LED not the Board, the resistor is to limit the current across the LED, anyway the board stills works If I run the Led Blink sketch, it doesn't work when it comes to WiFi applications .

Drawing too much current from an I/O pin absolutely can damage a microcontroller. The resistor is to limit the current for the LED and the pin both. The maximum current rating for ESP8266 I/O pins is only 12 mA. The maximum current for that LED is probably around 35-40 mA. So the ESP8266 will be damaged before the LED will.

If you've got one the common LCD character displays with the i2c connection (4 pins), check out the library LiquidCrystalI2C. Otherwise if you don't have i2c (16 pins I think?), try the normal LiquidCrystal library.