Make a Blog With Esp8266

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

Step 1: Web Design

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:

Step 2: 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

Step 3: 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

Step 4: NAT Port

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 :)

Step 5: DDNS

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

Step 6: Instruc Video in Vietnamese

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

Step 7: 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

Share

    Recommendations

    • Epilog X Contest

      Epilog X Contest
    • Build a Tool Contest

      Build a Tool Contest
    • Paper Contest

      Paper Contest

    Discussions