Wujek_Dualsense_API 1.4.7
See the version list below for details.
dotnet add package Wujek_Dualsense_API --version 1.4.7
NuGet\Install-Package Wujek_Dualsense_API -Version 1.4.7
<PackageReference Include="Wujek_Dualsense_API" Version="1.4.7" />
paket add Wujek_Dualsense_API --version 1.4.7
#r "nuget: Wujek_Dualsense_API, 1.4.7"
// Install Wujek_Dualsense_API as a Cake Addin #addin nuget:?package=Wujek_Dualsense_API&version=1.4.7 // Install Wujek_Dualsense_API as a Cake Tool #tool nuget:?package=Wujek_Dualsense_API&version=1.4.7
Wujek Dualsense API
Wujek Dualsense API is a .NET library designed to interface with the PlayStation DualSense controller, providing functionalities to control its various features such as haptic feedback, LEDs, triggers, and more.
https://github.com/WujekFoliarz/Wujek-Dualsense-API
Features
- Initialize and manage DualSense controllers via USB or Bluetooth
- Control haptic feedback and rumble
- Set lightbar colors and player LEDs
- Adjust microphone and speaker volumes
- Access button states and sensor data (gyroscope, accelerometer)
- Play audio haptics from WAV files
Getting Started
Installation
Add the library to your project by including the Wujek_Dualsense_API
namespace:
using Wujek_Dualsense_API;
Usage
To start using the DualSense controller, create an instance of the Dualsense class, specifying the controller number (e.g., 0 for the first controller):
Dualsense dualsense = new Dualsense(0);
Examples
dualsense.Start(); // Start listening
dualsense.SetLightbar(0, 0, 255); // R G B
dualsense.SetPlayerLED(LED.PlayerLED.PLAYER_1); // The white LEDs below the touchpad
dualsense.SetMicrophoneLED(LED.MicrophoneLED.OFF); // Microphone LED
dualsense.SetMicrophoneVolume(100); // Microphone Volume
dualsense.SetSpeakerVolume(100); // Speaker Volume
dualsense.SetLeftTrigger(TriggerType.TriggerModes.Pulse_AB, 93, 84, 0, 255, 255, 0, 0); // Example adaptive trigger
dualsense.SetRightTrigger(TriggerType.TriggerModes.Pulse_B, 14, 255, 0, 14, 255, 0, 0); // Example adaptive trigger
dualsense.SetVibrationType(Vibrations.VibrationType.Standard_Rumble); // Use standard rumble (Controller audio won't work with this option)
dualsense.SetStandardRumble(100, 255); // Start vibrations
Console.ReadLine();
dualsense.Dispose() // Disconnects from the controller and resets any applied settings
Haptic Feedback example
To play correctly, the WAV file must be a Stereo 48KHz IEEE Float PCM
dualsense.Start(); // Start listening
dualsense.SetVibrationType(Vibrations.VibrationType.Haptic_Feedback); // Use haptic feedback and audio
dualsense.PlayHaptics("player_collar_beep_end_0.wav", 1.0f, 1.0f, 1.0f, true); // (WAV file location, speaker volume, left acustor volume, right acustor volume, cancel previous sounds)
Console.ReadLine();
dualsense.Dispose() // Disconnects from the controller and resets any applied settings
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0-windows10.0.22621 is compatible. |
-
net8.0-windows10.0.22621
- HidSharp (>= 2.1.0)
- NAudio (>= 2.0.1)
- NAudio.Wasapi (>= 2.0.0)
- Nefarius.Utilities.DeviceManagement (>= 3.22.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.6.3 | 100 | 10/11/2024 | |
1.6.2 | 85 | 10/11/2024 | |
1.6.1 | 67 | 10/7/2024 | |
1.6.0 | 70 | 10/7/2024 | |
1.5.9 | 69 | 10/7/2024 | |
1.5.8 | 83 | 10/6/2024 | |
1.5.7 | 79 | 10/6/2024 | |
1.5.6 | 85 | 10/6/2024 | |
1.5.5 | 80 | 10/6/2024 | |
1.5.4 | 83 | 10/3/2024 | |
1.5.2 | 85 | 10/1/2024 | |
1.5.1 | 85 | 10/1/2024 | |
1.5.0 | 101 | 9/30/2024 | |
1.4.9 | 84 | 9/21/2024 | |
1.4.7 | 97 | 9/12/2024 | |
1.4.6 | 87 | 9/12/2024 | |
1.4.5 | 124 | 9/6/2024 | |
1.4.3 | 106 | 8/31/2024 | |
1.4.2 | 96 | 8/28/2024 | |
1.4.1 | 93 | 8/28/2024 | |
1.4.0 | 81 | 8/28/2024 | |
1.3.9 | 91 | 8/28/2024 | |
1.3.8 | 109 | 8/28/2024 | |
1.3.7 | 96 | 8/28/2024 | |
1.3.6 | 92 | 8/27/2024 | |
1.3.5 | 103 | 8/27/2024 | |
1.3.4 | 90 | 8/27/2024 | |
1.3.3 | 108 | 8/19/2024 | |
1.2.7 | 110 | 8/16/2024 | |
1.2.6 | 100 | 8/9/2024 | |
1.2.5 | 76 | 8/3/2024 | |
1.2.4 | 79 | 7/30/2024 | |
1.2.3 | 92 | 7/22/2024 | |
1.1.7 | 83 | 7/15/2024 | |
1.1.6 | 101 | 7/15/2024 | |
1.1.5 | 107 | 7/13/2024 | |
1.1.4 | 89 | 7/12/2024 | |
1.1.3 | 96 | 7/10/2024 | |
1.1.2 | 107 | 7/6/2024 | |
1.1.1 | 110 | 7/4/2024 | |
1.0.8 | 106 | 7/2/2024 | |
1.0.7 | 109 | 6/29/2024 | |
1.0.6 | 97 | 6/22/2024 | |
1.0.5 | 120 | 6/20/2024 | |
1.0.4 | 108 | 6/15/2024 | |
1.0.3 | 106 | 6/15/2024 | |
1.0.2 | 102 | 6/14/2024 | |
1.0.1 | 99 | 6/14/2024 | |
1.0.0 | 105 | 6/14/2024 |