Which one is the joystick ID?

23 Ansichten (letzte 30 Tage)
Pancy
Pancy am 30 Sep. 2024
Bearbeitet: praguna manvi am 1 Okt. 2024
I am trying to use the vrjoystick command in Matlab to create a joystick object. From the help documentation, I should use the command joy = vrjoystick(id). My problem is that I don't know how to find out the id.
The description in help is as follows- "The id parameter is a one-based joystick ID. The joystick ID is the system ID assigned to the given joystick device." But, when I get to the device manager, I saw a lot of "IDs" (e.g. hardware IDs, Compatible IDs, etc.) under the "details" tab of the properties window of the Xbox 360 Controller for Windows. I tried to input everyone one of them, but none of them worked.
How should I get the system ID (there is no system ID in the properties window) of a joystick? How should the ID look like? Thank you.

Akzeptierte Antwort

praguna manvi
praguna manvi am 1 Okt. 2024
Bearbeitet: praguna manvi am 1 Okt. 2024
Hi @Pancy,
As I understand it, you are trying to use the "vrjoystick" function. The "id" parameter, as mentioned in the documentation, is 1-based, which means it is an integer. If there are multiple joysticks, they might be assigned IDs 1, 2, 3, etc., depending on the order in which they were connected or recognized by the system. You can refer to the documentation below for details about "vrjoystick" properties:
This typically means that the command "vrjoystick(1)" can be used to create a joystick object.
Hope this helps!

Weitere Antworten (0)

Produkte


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by