Исправил
This commit is contained in:
parent
07b2d7ec8f
commit
e34b958d6c
@ -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():
|
||||
|
44
Версия_3.0/Server.spec
Normal file
44
Версия_3.0/Server.spec
Normal file
@ -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',
|
||||
)
|
BIN
Версия_3.0/__pycache__/minimalmodbus.cpython-312.pyc
Normal file
BIN
Версия_3.0/__pycache__/minimalmodbus.cpython-312.pyc
Normal file
Binary file not shown.
BIN
Версия_3.0/Снимок.PNG
Normal file
BIN
Версия_3.0/Снимок.PNG
Normal file
Binary file not shown.
After Width: | Height: | Size: 43 KiB |
Loading…
Reference in New Issue
Block a user