# 34 HelloWorld.py import netman import socket from machine import Pin ssid = 'xxxx' password = 'xxxx' country = 'US' wifi_connection = netman.connectWiFi(ssid,password,country) def web_page(): f = open("HelloWorld.html","rt") x = f.read() x = x.replace('\r\n',' ') return(x) # Open socket addr = socket.getaddrinfo('0.0.0.0', 80)[0][-1] wlan = socket.socket() wlan.bind(addr) wlan.listen(1) print('listening on', addr) while(1): cl, addr = wlan.accept() print('client connected from', addr) request = cl.recv(1024) response = web_page() cl.send(response) cl.close()