Configure a webgamepad
Configuring a webgamepad
input controller allows you to use a web-based gamepad as a device to communicate with your robot.
Important
You must use “WebGamepad” as the name
of the web gamepad controller.
This restriction will be removed in the future.
Configuration
Use the following configuration for an input controller of model webgamepad
:
Navigate to the Config tab of your robot’s page in the Viam app.
Click on the Components subtab and click Create component.
Select the input_controller
type, then select the webgamepad
model.
Enter the name WebGamepad
and click Create.
{
"components": [
{
"name": "WebGamepad",
"model": "webgamepad",
"type": "input_controller",
"namespace": "rdk",
"attributes": {},
"depends_on": []
}
]
}
Test the input controller
After you configure your input controller, navigate to the Control tab and select the dropdown panel dedicated to the input controller. View the current value of each input on your controller.
Important
You have to press a button or move a stick on your gamepad for the browser to report the gamepad. For your security, the browser won’t report a gamepad until an input has been sent.
Troubleshooting
You can find additional assistance in the Troubleshooting section.
You can also ask questions in the Community Discord and we will be happy to help.
Have questions, or want to meet other people working on robots? Join our Community Discord.
If you notice any issues with the documentation, feel free to file an issue or edit this file.
Was this page helpful?
Glad to hear it! If you have any other feedback please let us know:
We're sorry about that. To help us improve, please tell us what we can do better:
Thank you!