diff --git a/Версия_3.0/Server.py b/Версия_3.0/Server.py index cc0b6df..8e3149b 100644 --- a/Версия_3.0/Server.py +++ b/Версия_3.0/Server.py @@ -4,7 +4,6 @@ import serial import serial.tools.list_ports import minimalmodbus -import time from flask import Flask, jsonify, render_template app = Flask(__name__) @@ -22,6 +21,12 @@ slave_id = 1 # ID устройства (адрес Arduino) baudrate = 9600 timeout = 1 # Время ожидания в секундах +if port is None: + print("Arduino не подключено или не найдено") +else: + print(f"Подключено к порту: {port}") + + @app.route('/') def index(): diff --git a/Версия_3.0/Server.spec b/Версия_3.0/Server.spec new file mode 100644 index 0000000..41d4d5d --- /dev/null +++ b/Версия_3.0/Server.spec @@ -0,0 +1,44 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['Server.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='Server', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) +coll = COLLECT( + exe, + a.binaries, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='Server', +) diff --git a/Версия_3.0/__pycache__/minimalmodbus.cpython-312.pyc b/Версия_3.0/__pycache__/minimalmodbus.cpython-312.pyc new file mode 100644 index 0000000..6b80293 Binary files /dev/null and b/Версия_3.0/__pycache__/minimalmodbus.cpython-312.pyc differ diff --git a/Версия_3.0/Снимок.PNG b/Версия_3.0/Снимок.PNG new file mode 100644 index 0000000..43d9b64 Binary files /dev/null and b/Версия_3.0/Снимок.PNG differ