w600-pico costycnc first test web server led
In this video tutorial
will show you how command a led with w600-pico conected as access point ... so directly to your computer or phone wifi ... without need to be conected through modem wifi !
If buy for me the module from https://www.costycnc.com/store/product/w600-pico-costycnc
If want to write self the program ... the program:
# setup the webserver
try:
import usocket as socket
except:
import socket
led = Pin(Pin.PA_00, Pin.OUT, Pin.PULL_FLOATING)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # create new socket, address family type = AF_INET, socket type = SOCK_STREAM
s.bind(('', 80))
s.listen(5) # accept connections. backlog = 5 = max. number of unaccepted connections before refusing new connections
while True:
conn, addr = s.accept()
request = conn.recv(200)
print(request)
if "/ledon" in request:
led.value(0)
if "/ledoff" in request:
led.value(1)
conn.send("HTTP/1.1 200 ok\n")
conn.send("Content-type: text /html\n")
conn.send("Connection: close\n\n")
conn.sendall("Hello")
conn.close()
In this part1 tutorial https://www.instructables.com/W600-pico-Tutorial-Sample-Ap-Web-Server-Costycnc/ and part2 tutorial https://www.instructables.com/Upload-Files-to-W600-pico-Module-With-Costycnc-Fir/ i explain how prepare w600-pico module to can upload file over ftp.
Here https://www.costycnc.com/blog/micropython-w600-pico-and-28byj-48-motor you can find another tutorial how command a stepper over web browser!!!
If you want buy one of low cost foam cutter machines that i made ... visit https://www.costycnc.com/store
Also you can visit www.costycnc.it form more details about this low cost foam cutter cnc
Commenti
Posta un commento