Micropython


http://robin.me/pi.html
Micropython Docs https://docs.micropython.org/en/latest/esp8266/tutorial/intro.html
Index Wifi Wifi # ************************ # Configure the ESP32 wifi # as Access Point mode. import network ssid = 'ESP32-AP-WebServer' password = '123456789' ap = network.WLAN(network.AP_IF) ap.active(True) ap.config(essid=ssid, password=password) while not ap.active(): pass print('network config:', ap.ifconfig()) # ************************ # Configure the ESP32 wifi # as Node Point mode. import network ssid = "dlink_DWR-2101-BCD5" password = "EfDjW62347" sta = network.WLAN(network.STA_IF) if not sta.isconnected(): print('connecting to network...') sta.active(True) #sta.connect('your wifi ssid', 'your wifi password') sta.connect(ssid, password) while not sta.isconnected(): pass print('network config:', sta.ifconfig()) Index web client >>> help() >>> import network set hostname: wlan = network.WLAN(network.STA_IF) wlan.active(True) wlan.config(dhcp_hostname = 'esspressive' ) boot.py def do_connect(ssid, pwd): import network sta_if = network.WLAN(network.STA_IF) if not sta_if.isconnected(): print('connecting to network...') sta_if.config(dhcp_hostname="ESP32") sta_if.active(True) sta_if.connect(ssid, pwd) while not sta_if.isconnected(): pass print('network config:', sta_if.ifconfig()) # This file is executed on every boot (including wake-boot from deepsleep) #import esp #esp.osdebug(None) # Attempt to connect to WiFi network do_connect('your_ssid', 'your_password') import webrepl webrepl.start() webrepl from repl prompt: import network wlan = network.WLAN(network.STA_IF) wlan.active(True) wlan.connect('ssid', 'password') wlan.ifconfig() sta_if.config('dhcp_hostname') web server https://techtotinker.blogspot.com/2020/11/016-esp32-micropython-web-server-esp32.html
https://techtotinker.blogspot.com/2020/08/tutorial-esp32-web-server-esp32-wifi-in.html?m=1 mqtt
mqtt https://randomnerdtutorials.com/micropython-mqtt-esp32-esp8266/
https://randomnerdtutorials.com/micropython-esp32-esp8266-dht11-dht22-web-server/
https://randomnerdtutorials.com/micropython-mqtt-publish-bme680-esp32-esp8266/
https://randomnerdtutorials.com/micropython-esp32-esp8266-bme280-web-server/
Weather station web server https://randomnerdtutorials.com/micropython-esp32-esp8266-dht11-dht22-web-server/