Skip to content

Instantly share code, notes, and snippets.

View sergiu-tot's full-sized avatar

Sergiu Tot sergiu-tot

View GitHub Profile
@sergiu-tot
sergiu-tot / async_webserver.py
Created October 10, 2022 08:16 — forked from aallan/async_webserver.py
An asynchronous webserver written in MicroPython to turn an LED on/off on a Raspberry Pi Pico W
import network
import socket
import time
from machine import Pin
import uasyncio as asyncio
led = Pin(15, Pin.OUT)
onboard = Pin("LED", Pin.OUT, value=0)
0 = Success
1 = Operation not permitted
2 = No such file or directory
3 = No such process
4 = Interrupted system call
5 = Input/output error
6 = No such device or address
7 = Argument list too long
8 = Exec format error