Skip to content

Nacht1gall/literadio-2-se-usb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BETAFPV LiteRadio 2 SE Radio Transmitter USB (Python)


Introduction


I wanted to control my DJI Tello drone with a BETAFPV LiteRadio 2 SE controller via USB connected to a computer. So I made this small project when I had some spare time.

Installing


Install using `pip`:
pip install literadio2-se-usb

Usage


from literadio2_se_usb import LiteRadio2SeUsb

controller = LiteRadio2SeUsb()
# Do not forget to run this method before reading the control outputs
controller.setup()
# Read the control outputs
controls = controller.read_controls()
print(f'{controls.throttle}')
print(f'{controls.yaw}')
print(f'{controls.roll}')
print(f'{controls.pitch}')
print(f'{controls.sa}')
print(f'{controls.sb}')
print(f'{controls.sc}')
print(f'{controls.sd}')

The "read_controls" method returns the "Controls" dataclass. Each attribute of that dataclass outputs an integer between 0 and 2047. You can pass map_to_hundred=True to the "read_controls" method to change the output from -100 to 100.

You can specify the vendor ID and the product ID

from literadio2_se_usb import LiteRadio2SeUsb

controller = LiteRadio2SeUsb(0x0483, 0x5750)
# Or
controller = LiteRadio2SeUsb(id_vendor=0x0483, id_product=0x5750)

Otherwise the program will try to find an appropriate device by its product name (by default it's "BETAFPV Joystick").

You can change this product name if you want to.

from literadio2_se_usb import LiteRadio2SeUsb

controller = LiteRadio2SeUsb(product_string='Product string')

About

BETAFPV LiteRadio 2 SE Radio Transmitter USB (Python)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages