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