Button Component
The button component provides an API for getting presses of a physical button on a machine.
Configuration
To use your button component, check whether one of the following models supports it.
For configuration information, click on the model name:
API
The button API supports the following methods:
Method Name | Description | viam-micro-server Support |
---|---|---|
Push | Push the button. | |
DoCommand | Execute model-specific commands that are not otherwise defined by the component API. | |
Close | Safely shut down the resource and prevent further use. |
Troubleshooting
If your button is not working as expected, follow these steps:
- Check your machine logs on the LOGS tab to check for errors.
- Review your button model’s documentation to ensure you have configured all required attributes.
- Click on the TEST panel on the CONFIGURE or CONTROL tab and test if you can use the button there.
If none of these steps work, reach out to us on the Community Discord and we will be happy to help.
Next steps
For general configuration, development, and usage info, see:
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!