Friday, May 22, 2015

Arduino Due + ESP8266 as client, connect to Python SimpleHTTPServer

Last post show the program of "Arduino Due + ESP8266 as client, connect to website". We can also host our simple web server using python SimpleHTTPServer.

- It's assumed you have Python installed.
- Create a simple "index.html".
- Start the python SimpleHTTPServer with command:
$ python -m SimpleHTTPServer

Now you can visit http://<ip address>:8000 using browser, in the same network.

SimpleHTTPServer will check for file named index.html or index.htm in current directory. If found, the file’s contents are returned; otherwise a directory listing are returned.

Then you can update the Arduino code in last post "Arduino Due + ESP8266 as client, connect to website" to load the index.html.


No comments:

Post a Comment