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.

Prerequisites

A device that can run viam-server or viam-micro-server
See viam-server Platform requirements and viam-micro-server Platform requirements for more information on if your device is suitable.

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.

The 'First Location' page on the Viam app with a new machine name in the New machine field and the Add machine button next to the field highlighted.

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.

A machine on the CONFIGURE tab with a board, two motors, and a camera

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:

  1. On your machine’s CONFIGURE tab, click the + button next to your machine part and select Component.
  2. Select the component type you need.
  3. 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.
  1. 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.

  2. Click the TEST area of the configuration panel to test your component.

  3. 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.