ESP8266 WiFiClient connection always returns 0
I had the same problem with my esp-01. Just download ESPWenServer library from here.


  https://github.com/esp8266/ESPWebServer


And from this try HelloServer.ino example code. If it still does not connects-
1.Either your WIFI is not working
2.You are typing wrong SSID and PASSWORD
3.Spacing between SSID name or PASSWORD is the issue.


For the 3rd one if possible change your Wifi password or name if it has spaces between it.