Изменение порта

This commit is contained in:
krupppa 2024-05-20 18:42:46 +03:00
parent 484e04d0bb
commit b43920bacc

7
ard.py
View File

@ -1,10 +1,11 @@
import uvicorn
from serial import Serial
import threading
from fastapi import FastAPI
s=""
ser = Serial('COM4', 9600)
ser = Serial('COM6', 9600)
def pot():
global s
while True:
@ -16,3 +17,7 @@ app = FastAPI()
@app.get("/")
async def root():
return ("message", s)
if __name__ == "__main__":
uvicorn.run(app, port=10000)