Add serial debugger

This commit is contained in:
GHOSCHT 2023-03-30 17:50:04 +02:00
parent 908f0a5e9c
commit 5fe004ce30
No known key found for this signature in database
3 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,10 @@
import serial
import time
ser = serial.Serial(port='/dev/ttyUSB0', baudrate=115200)
ser.write(b'HX\x02\x02\x00')
time.sleep(1)
ser.write(b'HX\x02\x02\x01')
print(f"Listening for messages on {ser.name}:")
while True:
print(ser.readline())
ser.close()

48
modules/debugger/poetry.lock generated Normal file
View file

@ -0,0 +1,48 @@
# This file is automatically @generated by Poetry 1.4.0 and should not be changed by hand.
[[package]]
name = "autopep8"
version = "2.0.2"
description = "A tool that automatically formats Python code to conform to the PEP 8 style guide"
category = "dev"
optional = false
python-versions = ">=3.6"
files = [
{file = "autopep8-2.0.2-py2.py3-none-any.whl", hash = "sha256:86e9303b5e5c8160872b2f5ef611161b2893e9bfe8ccc7e2f76385947d57a2f1"},
{file = "autopep8-2.0.2.tar.gz", hash = "sha256:f9849cdd62108cb739dbcdbfb7fdcc9a30d1b63c4cc3e1c1f893b5360941b61c"},
]
[package.dependencies]
pycodestyle = ">=2.10.0"
[[package]]
name = "pycodestyle"
version = "2.10.0"
description = "Python style guide checker"
category = "dev"
optional = false
python-versions = ">=3.6"
files = [
{file = "pycodestyle-2.10.0-py2.py3-none-any.whl", hash = "sha256:8a4eaf0d0495c7395bdab3589ac2db602797d76207242c17d470186815706610"},
{file = "pycodestyle-2.10.0.tar.gz", hash = "sha256:347187bdb476329d98f695c213d7295a846d1152ff4fe9bacb8a9590b8ee7053"},
]
[[package]]
name = "pyserial"
version = "3.5"
description = "Python Serial Port Extension"
category = "main"
optional = false
python-versions = "*"
files = [
{file = "pyserial-3.5-py2.py3-none-any.whl", hash = "sha256:c4451db6ba391ca6ca299fb3ec7bae67a5c55dde170964c7a14ceefec02f2cf0"},
{file = "pyserial-3.5.tar.gz", hash = "sha256:3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb"},
]
[package.extras]
cp2110 = ["hidapi"]
[metadata]
lock-version = "2.0"
python-versions = "^3.11"
content-hash = "e62c345d7dc7473afcf2d0b5bdf8471dec4b4834efc156b4cef53daeb59c89ff"

View file

@ -0,0 +1,18 @@
[tool.poetry]
name = "debugger"
version = "0.1.0"
description = ""
authors = ["GHOSCHT <31184695+GHOSCHT@users.noreply.github.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
pyserial = "^3.5"
[tool.poetry.group.dev.dependencies]
autopep8 = "^2.0.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"