Which one is the joystick ID?

23 ビュー (過去 30 日間)
Pancy
Pancy 2024 年 9 月 30 日
編集済み: praguna manvi 2024 年 10 月 1 日
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.

採用された回答

praguna manvi
praguna manvi 2024 年 10 月 1 日
編集済み: praguna manvi 2024 年 10 月 1 日
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!

その他の回答 (0 件)

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by