So i have a loop like this on my raspberry pi pico w with micro python, I'm using it to run a serverHow can i have the server up constantly, but in the same time run diferent code.
Code:
while True: try: cl, addr = s.accept() clientIP = addr[0] response = html % str(clientIP) cl.send('HTTP/1.0 200 OK\r\nContent-type: text/html\r\n\r\n') cl.send(response) cl.close() except OSError as e: cl.close() print('conection closed')
Statistics: Posted by fepi — Fri Apr 26, 2024 1:06 pm — Replies 7 — Views 70