From 5286a9de73e67e931f2877fa9874410b2d40534b Mon Sep 17 00:00:00 2001 From: Juul Date: Wed, 16 Jul 2025 18:05:37 +0200 Subject: [PATCH] Created makefile, organized files, updated gitignore --- .gitignore | 3 ++- Makefile | 5 +++++ Telegram.py => Telegram/Telegram.py | 0 TelegramData.py => Telegram/TelegramData.py | 0 ioUtil.py => Util/ioUtil.py | 4 ++++ main.py => __main__.py | 0 6 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 Makefile rename Telegram.py => Telegram/Telegram.py (100%) rename TelegramData.py => Telegram/TelegramData.py (100%) rename ioUtil.py => Util/ioUtil.py (81%) rename main.py => __main__.py (100%) diff --git a/.gitignore b/.gitignore index 4c514eb..208a4b7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ #Build files build/* dist/* -*.pyz \ No newline at end of file +*.pyz +*.spec \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..33cb34d --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ +run: + python3 __main__.py + +package: + rm p1-fopper.pyz && python3 -m zipapp . -o p1-fopper.pyz \ No newline at end of file diff --git a/Telegram.py b/Telegram/Telegram.py similarity index 100% rename from Telegram.py rename to Telegram/Telegram.py diff --git a/TelegramData.py b/Telegram/TelegramData.py similarity index 100% rename from TelegramData.py rename to Telegram/TelegramData.py diff --git a/ioUtil.py b/Util/ioUtil.py similarity index 81% rename from ioUtil.py rename to Util/ioUtil.py index 4fc30c7..810e731 100644 --- a/ioUtil.py +++ b/Util/ioUtil.py @@ -8,6 +8,10 @@ OUTPUT_PORT = '/dev/ttyUSB0' dataInput = serial.Serial(INPUT_PORT, 115200, timeout=1) dataOutput = serial.Serial(OUTPUT_PORT, 115200, timeout=1) +def lees(): + while True: + line = dataInput.readline() + print(line) def verzend(telegram): while True: diff --git a/main.py b/__main__.py similarity index 100% rename from main.py rename to __main__.py