Shares

ESP8266 Web Server with Arduino IDE

Shares

If you want to learn more about the ESP8266 module, first read my Getting Started Guide for the ESP8266 WiFi Module. In this project you’ll create a standalone web server with an ESP8266 that can toggle two LEDs.

If you like the ESP and you want to do more projects you can read my eBook Password Protected Web Server Accessible from Anywhere using ESP8266 and Arduino IDE.

Let’s get started!

First, watch the video demonstration below


Where to buy?

You can click here to get this module on eBay for less than $4.

Click the image above, to see on ebay.

Click the image above, to see on eBay.

Schematics (3.3V FTDI Programmer)

The schematics to upload code to your ESP8266 are very straight forward. You only need to establish a serial communication between your FTDI programmer and your ESP8266 to upload some code.Flashing Firmware - FTDI Programmer

Uploading your ESP8266 code

Having the ESP8266 add-on for the Arduino IDE installed (How to Install the ESP8266 Board in Arduino IDE).

Go to Tools and select “Generic ESP8266 Module”.

Arduino IDE select esp8266

Copy the sketch below to your Arduino IDE. Replace the SSID and password with your own credentials.

After modifying my sketch upload it to your ESP8266 (If you can’t upload code to your ESP8266, read this troubleshooting guide).

ESP8266 IP Address

Open the Arduino serial monitor at a baud rate of 115200. Connect GPIO 0 of your ESP8266 to VCC and reset your board.

After a few seconds your IP address should appear. In my case it’s 192.168.1.70.

esp ip address

Final Circuit

Now follow the schematics below to create your web server to control two LEDs.

ESP-web-server_bb

Demonstration

For the final demonstration open any browser from a device that is connected to the same router that your ESP is. Then type the IP address and click Enter!

Screenshot_2015-09-15-18-31-33

Now when you press the buttons in your web server you can control both sockets

Do you have any questions? Leave a comment down below!

Thanks for reading. If you like this post probably you might like my next ones, so please support me by subscribing my blog and my Facebook Page.

P.S. If you got stuck during this tutorial make sure you read “ESP8266 Troubleshooting Guide

Leave a Comment:

Add Your Reply