Files
pydualsense/examples/effects.py
Florian Kaiser 94cb09dbdd v0.4.0
- refactored code structure
- fixed playerID led display
- added Color function with tuple support
- added type checking in every function
- added more Exceptions for out of bound values
2020-12-31 23:48:34 +01:00

22 lines
534 B
Python

from pydualsense import *
# get dualsense instance
dualsense = pydualsense()
dualsense.init()
print('Trigger Effect demo started')
dualsense.setLeftMotor(255)
dualsense.setRightMotor(100)
dualsense.triggerL.setMode(TriggerModes.Rigid)
dualsense.triggerL.setForce(1, 255)
dualsense.triggerR.setMode(TriggerModes.Pulse_A)
dualsense.triggerR.setForce(0, 200)
dualsense.triggerR.setForce(1, 255)
dualsense.triggerR.setForce(2, 175)
import time; time.sleep(3)
# terminate the thread for message and close the device
dualsense.close()