SaddlebackCollegeRobotics / turret_python_interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Turret python interface

This python library provides a programmatic interface to the turret monitor firmware.

The aim is to provide a pythonic interface for interacting with this device.

Example usage

from turret_python_interface import Interface

from pathlib import Path

# Assuming a RPi is the host running this code,
# and that the builtin USART header is to be used.
serial_path = Path(r'/') / "dev" / "ttyS0"

with Interface(serial_path=serial_path, baud=115200, timeout=5) as iface:
    # NOTE: Thread-blocking call.
    print(iface.get_telemetry())

About


Languages

Language:Python 100.0%