There are but a few things better than (succesfully) programming and using your Arduino. Surely one of those things is using your ESP8266 as an Arduino with WiFi!
In this instructable I will show you an EASY way to get the ESP8266 working as a web server AND accessing that server from anywhere (over the internet)
Also if you find this instructable interesting, perhaps you’ll like some of my others:
Step 1: What You’ll Need:
Since the esp8266 NodeMcu is so cheap, I highly recommend buying one. You can simply plug it into your PC and use it as an Arduino. No weird commands or anything “unknown”.
I hightly recommend buying the ESP8266 NodeMcu from this link:ESP8266
If you use the code (send the seller a message when you buy it) saying “Instructables“, he will make sure to quickly send you a top quality ESP8266.
Step 2: Arduino IDE+ESP8266:
Open up the Arduino IDE
-Go to File->Preferences->Additional Boards Manager URLs: http://arduino.esp8266.com/stable/package_esp8266c… ->click OK
-Close the IDE and open it up again
-Go to Tools->Board (where you’d select your version of Arduino)->Boards Manager, find the ESP8266 and click Install
You now should be able to use the ESP8266 as an Arduino. Simply select the NODEMCU 1.0 as your board and you should be ready to code. (if it doesn’t work, try the 0.9 version)
Step 3: “Arduino” Code:
Since the code gets messed up when pasted, I have included it as an txt file. Download it and paste it into your Arduino IDE.
The code is commented, so you should have no trouble understanding what to change to suit your needs.
Read more: Control ESP8266 over the internet