Skip to main content

A Python module for interfacing with Logitech steering wheels.

Project description

LogiDrivePy - Logitech Controller Python Module

A Python module for interfacing with Logitech steering wheels. This module was tested with the Logitech G920 Driving Force Racing Wheel but should work with other Logitech devices as specified in the Supported Devices section.

Introduction

This Python module facilitates interaction with Logitech steering wheels, serving as a bridge between Python and the Logitech Steering Wheel's software components.

The original functionality was provided in the form of a C# implementation as part of the Logitech Steering Wheel SDK for the Unity Game Engine. The SDK allows developers to easily add Logitech steering wheel support to their games, using a set of predefined force feedback effects or creating custom effects by defining specific forces.

With the aim to extend these capabilities to the Python community, this module was developed as an accessible tool for Python developers. Utilizing the ctypes Python library, the module enables Python scripts to load and interact with Logitech steering wheels through Logitech's DLL (LogitechSteeringWheelEnginesWrapper.dll), providing a seamless integration experience for developers working with these devices.

Supported Devices

This library was tested with the Logitech G920 Driving Force Racing Wheel, but according to Logitech documentation, it should also work with the following devices:

Logitech

  • G29
  • G920
  • Driving Force GT
  • G27
  • G25
  • Driving Force Pro
  • MOMO Force
  • MOMO Racing
  • Formula Force GP
  • Driving Force
  • Formula Force
  • Force 3D
  • Strike Force 3D
  • Freedom 2.4 Cordless Joystick
  • Cordless Rumblepad
  • Cordless Rumblepad 2
  • Rumblepad

Microsoft

  • Sidewinder Force Feedback 2 (Stick)
  • Sidewinder Force (Wheel)

Other (with Immersion drivers)

  • Saitek Cyborg 3D Force
  • Act-Labs Force RS Wheel

Installation

To install the package, simply use pip:

pip install logidrivepy

The package directory layout is organized as follows:

LogiDrivePy
|   .gitignore
|   LICENSE.txt
|   README.md
|   setup.py
|
+---logidrivepy
|   |   constants.py
|   |   controller.py
|   |   functions.py
|   |   structs.py
|   |   __init__.py
|   |
|   +---dll
|   |       LogitechSteeringWheelEnginesWrapper.dll
|
+---tests
    |   run_controller_test.py
    |   spin_wheel_test.py
    |   __init__.py

Usage

Here's a simple example on how to use the Logitech Controller module in your Python script.

from logidrivepy import LogitechController

controller = LogitechController()

print(f"steering_initialize: {controller.steering_initialize()}")
print(f"logi_update: {controller.logi_update()}")
print(f"is_connected: {controller.is_connected(0)}")

controller.steering_shutdown()

Dependencies

This library uses the ctypes Python library to load and call functions from the Logitech's DLL (LogitechSteeringWheelEnginesWrapper.dll). The ctypes library is part of the standard Python library and should be installed by default with a standard Python installation.

This library also requires Tkinter, a Python binding to the Tk GUI toolkit. Tkinter is part of the standard Python library for Python 3 and should be installed by default with a standard Python installation.

License

This project is licensed under the terms of the MIT license. For more details, see the LICENSE.txt file.

Please note that this project is not a reverse engineering of the Logitech Gaming Steering Wheel SDK. Instead, this project aims to provide an interface to Logitech steering wheels in Python by utilizing the SDK's provided DLL file (LogitechSteeringWheelEnginesWrapper.dll) without decompiling, disassembling, or otherwise altering the SDK's components. This project is designed to extend the functionality of the SDK for Python developers while respecting and complying with the original End-User License Agreement of the SDK.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logidrivepy-0.2.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

logidrivepy-0.2.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file logidrivepy-0.2.0.tar.gz.

File metadata

  • Download URL: logidrivepy-0.2.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for logidrivepy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8607d6b6e99ef6bd789052ac0d9bf4dd47884ed0fc436a7118f46f9de76295c9
MD5 55c491e91c99113cbed89aee5e899813
BLAKE2b-256 2ea5acfe7a5768fbadf6c1cae005932e7316ca1e77c002c6ece8a598c7b160d0

See more details on using hashes here.

File details

Details for the file logidrivepy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: logidrivepy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for logidrivepy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1b84e3a606eac90b11bcaf1f060fa294aeac568e69c21780772d4956bf33a1f
MD5 6c2403e9821f4d3aaf1d6ac391dd1d34
BLAKE2b-256 762024b7c027f22daac3739a16b7bfb7e48720d6090e29c31c56f86efdcceff9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page