From b43920bacc703a7403b328acbe2a4752c7f9a45b Mon Sep 17 00:00:00 2001 From: krupppa <99729951+krupppa@users.noreply.github.com> Date: Mon, 20 May 2024 18:42:46 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D0=BE=D1=80=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ard.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ard.py b/ard.py index b958f1d..ef5e6ed 100644 --- a/ard.py +++ b/ard.py @@ -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: @@ -15,4 +16,8 @@ app = FastAPI() @app.get("/") async def root(): - return ("message", s) \ No newline at end of file + return ("message", s) + + +if __name__ == "__main__": + uvicorn.run(app, port=10000) \ No newline at end of file