ESP32 MicroWebSrv

Step 1: Why? The Purpose.

Setup MicroWebSrv and test the built-in web page examples.

Step 2: How? The Process.

  1. Download MicroWebSrv and Unzip it.

  2. Copy necessary files and folder to pyboard.

  3. Start the Web Server and Test the example files.

Step 3: What? The Result.

Verify "What we Get" by "Why we are Doing".

1: Download the MicroWebSrv and Unzip it.

Click here to download the MicroWebSrv.Zip

Note: I tried hard with MicroWebSrv2, but not work for me. So I will also not recommend it to anyone.

b) Unzip Location: Very Important.

Run rshell and change directory to /. After listing the files and folders, What I find that, rshell home directory (/) is my PC's C-Drive.

So I created a folder in C-Drive by name of ESP32. It really helps me in file transfer commands.

Unzip - MicroWebSrv in C:\ESP32\MicroWebSrv-master

rename main.py to start.py

Make Project folder as C:\ESP32\ESP32MicroWebSrv

2. Copy the following files/folders from MicroWebSrv-master to ESP32MicroWebSrv

  1. start.py

  2. microWebSrv.py

  3. microWebTemplate.py

  4. microWebSocket.py

  5. www (full folder)

After copying the necessary items to project folder, change directory to /pyboard and run the following commands:

Note: folder transfer will take 3 - 4 min time. Have patient and let the process finish.

Create/Edit main.py file inside pyboard folder.

From /pyboard call

--> edit main.py

Case 1: file already present. System will simply open the existing file with notepad.

Case 2: file is not present. System will create the file and open the blank file for edit.

Enter repl, import machine and reset ESP32.

At the end of booting process, you can see the message "Connection Successful" and network details like ip: 192.168.43.250 etc.

3: Start the Web Server and Test the example web pages.

Start web server by importing start.py file in repl.

Type the following in address-bar of a web-browser:

First Test Example: <Your IP address>

Second Test Example: <Your IP address>/test

Third Test Example: <Your IP address>/test.pyhtml

Fourth Test Example: <Your IP address>/wstest.html

Note: Refresh webpage to get the full content displayed.