Skip to main content

Bindings for a Microsoft Sidewinder Force Feedback 2 joystick.

Project description

SidewinderFFB2

C binding for reading the state of, and sending forces to, a Microsoft Sidwinder Force Feedback 2.

It currently supports two forces, a constant force and a "buzzer". The constant force pull the joystick to specific location. You can adjust the power of the pull with the gain on the force. The buzzer is just a simple buzzer to notify the user.

This currently only works on win32 platforms.

Usage:

import time
import SidewinderFFB2

SidewinderFFB2.init()
SidewinderFFB2.acquire()

# Make sure your holding the joystick to cover the sensor.
# Otherwise the joystick doesn't do the effects.
buzz = SidewinderFFB2.BuzzForce()
buzz.start()

x_y_force = SidewinderFFB2.ConstantForce()
# This will make the forces stronger/weaker.
# The default/mas is SidewinderFFB2.DI_FFNOMINALMAX, which is 10000.
x_y_force.set_gain(7000)

x_y_force.set_direction(SidewinderFFB2.DI_FFNOMINALMAX, SidewinderFFB2.DI_FFNOMINALMAX//2)

time.sleep(2.0)

joy_state = SidewinderFFB2.poll()

print(f"button 5 is pressed : {joy_state.buttons[5]}")
print(f"Joystick X:{joy_state.x} Y:{joy_state.y} throttle: {joy_state.throttle}")
print(f"The hat is pointing : {joy_state.pov}")

# This resets all the force effects loaded on the joystick.
SidewinderFFB2.reset()

SidewinderFFB2.release()

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

sidewinderffb2-0.0.1.tar.gz (581.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

sidewinderffb2-0.0.1-cp313-cp313-win_amd64.whl (75.9 kB view details)

Uploaded CPython 3.13Windows x86-64

sidewinderffb2-0.0.1-cp312-cp312-win_amd64.whl (75.9 kB view details)

Uploaded CPython 3.12Windows x86-64

sidewinderffb2-0.0.1-cp311-cp311-win_amd64.whl (76.2 kB view details)

Uploaded CPython 3.11Windows x86-64

sidewinderffb2-0.0.1-cp310-cp310-win_amd64.whl (74.9 kB view details)

Uploaded CPython 3.10Windows x86-64

sidewinderffb2-0.0.1-cp39-cp39-win_amd64.whl (75.0 kB view details)

Uploaded CPython 3.9Windows x86-64

sidewinderffb2-0.0.1-cp38-cp38-win_amd64.whl (74.9 kB view details)

Uploaded CPython 3.8Windows x86-64

File details

Details for the file sidewinderffb2-0.0.1.tar.gz.

File metadata

  • Download URL: sidewinderffb2-0.0.1.tar.gz
  • Upload date:
  • Size: 581.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for sidewinderffb2-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4f9425e3042e452409ca8392ab9ce0adc9be82af469068b31461d97b51c18df4
MD5 6e77934092def2a72f57acbd391839eb
BLAKE2b-256 501be3584708bd4629c871e106e0f036434f9bdac8b05e2481a8376ac67a3143

See more details on using hashes here.

File details

Details for the file sidewinderffb2-0.0.1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for sidewinderffb2-0.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f31f7f136a7cfe3eff2f85362af5b283e6b3457d73248c41b9c3e88b9f1e7677
MD5 5f9ea23b3911c60427679c966c616952
BLAKE2b-256 81e9d0eaee8bae2f9fbe4dc03a76f7dc6281f964587ff107db10837ef2c4e71c

See more details on using hashes here.

File details

Details for the file sidewinderffb2-0.0.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for sidewinderffb2-0.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a53949ef6d434d7a7b564a60565876f81a91d3927dab8d4f5e75ff325b44aa3a
MD5 58e65a6668837ebf8b2001f8a75b2324
BLAKE2b-256 48b5975cd41f779bf70c9dd715636b1c1c4a8eb9a65e04f2e4d8ac600b98fb18

See more details on using hashes here.

File details

Details for the file sidewinderffb2-0.0.1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for sidewinderffb2-0.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c116712ad6560c65a5cb2a5e75e0388b01b38cb036c33a6725322496aa286580
MD5 7586fc96bf4c763cdd9fefcbdc5cc767
BLAKE2b-256 cd6b36cc55b1534a00a1bf4194cf8447acacfca7feee281c5f1a37320c3efeb6

See more details on using hashes here.

File details

Details for the file sidewinderffb2-0.0.1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for sidewinderffb2-0.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 43c400688949816cbbb8de3208799858f3e05b1f437be7dda457d54ab85671c6
MD5 ee9a6d47b7d09bcea4be7b9639d5876a
BLAKE2b-256 ba9aef533596729eaada7d74c55e5c82151cbcdb6ae34827b3da167f85302b3b

See more details on using hashes here.

File details

Details for the file sidewinderffb2-0.0.1-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for sidewinderffb2-0.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 44ec3ed31b5311137c08cacb86c6b74a9ce1d823d1054b2b2fb69ecc84e9dc72
MD5 07e56ae5cb219a6c449682f99d9f39ea
BLAKE2b-256 56caecfbe44e7a47214b1bbd75835db9836537755f5fd86a5898d1bc54aaba24

See more details on using hashes here.

File details

Details for the file sidewinderffb2-0.0.1-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for sidewinderffb2-0.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d6e541ada7d122c951e909a9da3631f5a157d1db4b839e17048f5052f3c1a868
MD5 83a63a4b632e49e5d4b17935c5ce4d09
BLAKE2b-256 d63b9f75a502b7ac32e537cac35ab96fa002ea3b3978c234d1e54d7845cd59ff

See more details on using hashes here.

Supported by

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