Create and configure a machine
You can get any device running with Viam in just a few steps.
Viam’s modular system of components and services means that you can start doing interesting things with your machine without writing much or any code.
In this page
Prerequisites
Configure a machine
1. Create a machine in the Viam app
First, create a Viam account if you haven’t already. Log in to the Viam app
Create a machine in any location by clicking Add machine and typing in a name and.
2. Install Viam on your machine
Follow the setup instructions on your machine page to install viam-server
.
If you are using a microcontroller, install viam-micro-server
instead.
Follow the setup instructions until your machine connects and appear as Live in the Viam app.
3. Navigate to the CONFIGURE tab of your machine
All machines are configured on the CONFIGURE tab.
Click on the CONFIGURE tab of your machine’s page in the Viam app to navigate to it.
4. Configure your components
You will now create a configuration that describes any connected hardware as well as any software your device uses. The components in your configuration can describe:
- Physical hardware, such as arms, motors, or cameras.
- Wrappers that provide additional functionality for other configured components, for example a failover motor that switches from one motor to another if the primary motor fails.
- Software that maps to the API calls that you would use for existing hardware types. For example, a temperature sensor may provide temperature readings based on an online service instead of hardware readings. Another such type of sensor that is frequently used returns readings confirming it is safe to sync data or reconfigure a machine.
- Software that does not map well to the existing APIs, such as a switch that you’d like to be able to turn on an off. For these types of components, you use the generic component API.
Follow these for each component that makes up your machine:
- On your machine’s CONFIGURE tab, click the + button next to your machine part and select Component.
- Select the component type you need.
- Select from the available models for the component. You can find more information about the available models in each component’s documentation. For example, you can scroll through available sensor models on the sensor page.
Tip
If a component you want to use for your project is not natively supported, you can build your own modular resource.
When you add a component, it will create a panel in the configuration builder tool. Fill in any required attributes, following the documentation for the specific model. You can find this documentation by following the link to the model’s documentation from the available resources.
Click the TEST area of the configuration panel to test your component.
If any problems occur check the LOGS tab or check the component page for component-specific troubleshooting.
5. Control your components
When you configured each component, you saw the TEST panel on its configuration panel. You can also access the control interfaces for all your components in one place from the CONTROL tab.
6. Configure services
Services are software packages that add high-level functionality to your smart machine such as:
- Data Management: Capture and sync data from one or more machines, and use that data for machine learning and beyond.
- Computer Vision: Enable your machine to intelligently see and interpret the world around it.
- Motion Planning: Make your machine plan its movement and move itself.
- Simultaneous Localization And Mapping (SLAM): Make your machine map its surroundings and find its position on a map.
To use these or other services, see their documentation for configuration and usage information.
Next steps
For more information, see the configuration documentation. Once you have configured your machine, continue to develop an application. Or, if you have many machines, learn about how you can use fragments to configure multiple similar machines in one go:
To see full sample projects that configure and control machines, check out these tutorials:
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!