Skip to content

DAAMCS/PyTX16s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyTX16s

Python lib to interact with RadioMaster TX16s.

Probably works on other RC`s, needs to be tested.

Installation

The most important thing is that the HID API is installed in the system. For Windows, it is enough to download the hidapi-win.zip archive of the latest version and transfer the DLL file to the Windows\System32 folder. For other systems, there are instructions in the repository of the driver itself.

Python 3.x and Python HID Api(already in dependencies) is required (tested on Python 3.11 and newer).

pip install PyTX16s

also poetry can be used to work with sources:

poetry install

Basic Usage

Connect controller to PC, then instantiate a Joystick class. It must detect your controller automatically, otherwise - it will be prompt provided with connected devices list in your shell and you will be able to choose it manually.

import logging
from pytx16s import Joystick

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')

device = Joystick()

while True:
    print(device.get_device_report())

Package distribution notes

There are just notes to self for updating the pypi distribution

  • Update the release number in pyproject.toml and commit to repo.
  • Draft a new release in github using the same release number.
  • Run poetry build
  • Publish the distribution to pypi: poetry publish

About

Python lib to interact with RadioMaster TX16s

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages