ramOperationSystem
New member
Good day. Has anyone tried to output telemetry from the Radiomaster TX16S remote to the computer console through software development?
I've developed this code, but it hardly reads anything. The remote is equipped with a TBS Crossfire Micro TX V2. Maybe someone has tried to develop this software... Can you advise something?
I've developed this code, but it hardly reads anything. The remote is equipped with a TBS Crossfire Micro TX V2. Maybe someone has tried to develop this software... Can you advise something?
Code:
import serial
import time
def init_com_port(port='COM7', baudrate=115200, timeout=1):
try:
ser = serial.Serial(port, baudrate, timeout=timeout)
print(f"Підключено до порту {port}")
return ser
except Exception as e:
print(f"Помилка при відкритті порту {port}: {e}")
return None
def read_telemetry_data(ser):
while True:
data = ser.read(ser.in_waiting)
hex_data = " ".join(f"{byte:02x}" for byte in data)
print(hex_data)
time.sleep(0.01)
ser = init_com_port()
if ser:
read_telemetry_data(ser)