Any way to send output (vibration) to game controller?
Show older comments
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.
1 Comment
David
on 28 Feb 2022
Long shot here, did you ever get this figured out?
Answers (1)
Benjamin Thompson
on 28 Feb 2022
0 votes
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!