Make a Blog With Esp8266

by ductin in Circuits > Arduino

1719 Views, 4 Favorites, 0 Comments

Make a Blog With Esp8266

Screen Shot 2019-01-25 at 4.42.38 PM.png

If your blog is simple and traffic is normal, I will guide you to use esp8266 as a blog server. One year costs $ 1 electricity :)

And the result you will have a website like this: http://han.boxip.net

Web Design

Screen Shot 2019-01-25 at 4.42.38 PM.png

This is up to everyone. I use Google doc to make an introduction about myself and then save it to my computer in html format. But in today's tutorial, I downloaded a template available online for fast (https://www.w3schools.com/w3css/w3css_templates.asp) There are only a few details to note:

  • Photos should upload to a certain host and then take the link back to the html file (I use temporary photobucket)
  • The js, css libraries will normally have cdn. Use cdn instead of saving directly to esp8266.
  • For example, I will only have a home page to introduce myself so you can develop more :)

And this is the result when opening the html file on the computer:

Convert Html File Into H File

Open the html file (css, js) just got above. Then you copy the content. Go to https: //hs2t.com/tools/html2CString Paste the content in the first box and then press Convert. Copy the content in the second box :) put into the .h file

Esp8266 Code (using Arduino)

Download and edit the code below:

  • Change your home wifi
  • Change the static ip to the modem's settings (you must assign a fixed ip to make it easier to open the port to the internet)
  • For ddns section, I will explain more in the domain name assignment free!

Ok, after loading the code, go to its local IP test (for example, 192.168.1.24) to see that the website is ok: D

NAT Port

4141_88286189-1548650660-0-gpon-ont.png

This depends on your modem for example on your modem. My home uses a modem of gw040

When the port is finished, you can go to our blog from the internet using the IP address (eg http://123.123.123.123). yours.

Note:

  • A few modems open the port, then see the web by public IP with the network is not possible, but out of the network, the normal view is okay.
  • If you use 3G transmitter to network level for ESP8266, it will not work outside the internet :)

DDNS

4119_81286189-1548650902-0-edit-host---box-ip-dot-net-free-dynamic-dns-ddns-dyndns.png

Since our ip is dynamic, we need to use DDNS service. What is the name of a domain name associated with your home ip? When your home IP changes, it will update the DDNS service so that the service assigns a new IP to our domain.First you register an account and a free domain name like myname.boxip.net at https://boxip.net here I use the name https://boxip.net

Then copy the link wget in the settings page to replace it with the ESP8266 code. ESP8266 default every 5 minutes will call up DDNS server to update IP.Now try http://han.boxip.net and enjoy the results: P

Instruc Video in Vietnamese

Hướng dẫn làm web bằng esp8266

If you find it interesting and useful, remember to subscribe to the channel to receive more videos

The Article Inspired Me

https://www.instructables.com/id/How-to-Build-a-ES...

He has detailed instructions on how to create webserver. But the website is simple and only works locally. I have improved it to be a personal blog that can be viewed on the internet