Any way to send output (vibration) to game controller?

4 views (last 30 days)
I've seen a couple different toolboxes able to read input from game controllers, especially if they can interface via USB (e.g., Xbox). But does anyone know of a way to make such a controller vibrate, which I assume would be some sort of output signal? In particular, I'm looking to precisely control the timing and duration of the signal.

Answers (1)

Benjamin Thompson
Benjamin Thompson on 28 Feb 2022
If you are talking about Simulink, you can use legacy code tool or S-Function build to create an S-Function wrapping any C/C++ code. Or within MATLAB use clibgen, see documentation article "Build MATLAB Interface to C++ Library".
Here is the Microsoft link to using vibration in the Win32 API using XInput:

Categories

Find more on Video games in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!