Skip to main content

An API to interface with your Oculus Touch controllers.

Reason this release was yanked:

Unstable

Project description

py_oculus_touch

What is it?

This is a python library that allows you to interface with your Oculus Touch controllers and headset. It is a wrapper for the auto_oculus_touch project.

With it, you can read the current state of the controllers and headset, send button presses to the controller, or move the thumbsticks.

Installation

pip install py_oculus_touch

API Reference (Under Construction)

Example Usage

Below is a short program that will vibrate both controllers for 1 second whenever the X button is pressed while the headset is being worn.

from py_oculus_touch import OculusTouch, OculusTouchButtonEnum

# Initialize the OculusTouch object
oculus = OculusTouch()

while True:
    isWearing = oculus.Wearing()
    isXButtonDown = oculus.IsDown(OculusTouchButtonEnum.X)

    if isWearing and isXButtonDown:
        oculus.Vibrate(0, 1, 128, 1)
        oculus.Vibrate(1, 1, 128, 1)

    oculus.PollAndSleep()

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

py_oculus_touch-0.0.2.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

py_oculus_touch-0.0.2-py3-none-any.whl (110.9 kB view hashes)

Uploaded Python 3

Supported by

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