ESP32 LoBo WiFi

Step 1: Why? The Purpose.

Connect ESP32 to home WiFi with userName & password.

Step 2: How? The Process.

  1. Edit the main.py file to connect to wifi.

Step 3: What? The Result.

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

1: Edit the main.py file to connect to wifi.

a) Start rshell with notepad --> Change directory to /pyboard/flash/

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

b) Write the program in the notepad, save and close.

"gc.collect()" -- Some temp files are created during previous run. So Garbage collector collects all the garbage on system start.

"station = network.WLAN(network.STA_IF)"

Two network options:

  1. WiFi Client: Station: To access WiFi service.

  2. WiFi HotSpot: Access Point: To provide WiFi service.

"print(station.ifconfig())" -- Print the network configuration in repl.

Note: 1 indent = 2 space. Wifi name and password in single quote.

c) Start repl, import machine and reset ESP32 board.

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