Build a simple smart machine

You can get a smart machine 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.

Viam app login screen.

1. Create a machine in the Viam app

First, create a Viam account if you haven’t already. Log in.

Then create a machine by typing in a name and clicking Add machine.

Viam app login screen.
Installation icon

2. Install Viam on your machine

All of the software that runs your smart machine is packaged into a binary called viam-server. Install it on the computer controlling your smart machine by following the setup instructions in the Viam app.

An assortment of components.

3. Configure your components

Each physical piece of your smart machine that is controlled by a computer is called a component. For example, if your smart machine includes a Raspberry Pi, a motor, and a camera, each of those is a component.

You need to configure your machine so that viam-server can interact with its hardware. Use the configuration builder tool in the Viam app to create a file that describes what hardware you are using and how it is connected. For example, if you have a DC motor, follow the corresponding configuration instructions to tell the software which pins it is connected to.

4. Test your components

When you configure a component, a remote control panel is generated for it in the CONTROL tab of the Viam app. With the panels, you can drive motors at different speeds, view your camera feeds, see sensor readings, and generally test the basic functionality of your machine before you’ve even written any code.

Services

5. Configure services

Services are built-in Viam software packages that add high-level functionality to your smart machine like computer vision or motion planning. If you want to use any services, see their documentation for configuration and usage information. If you are making a simple machine that doesn’t use services, you can skip this step!

Services

6. Do more with code

Write a program to control your smart machine using the programming language of your choice. Viam has SDKs for Python, Golang, C++, TypeScript and Flutter.

The easiest way to get started is to copy the auto-generated boilerplate code from the Code sample page of the CONNECT tab on your machine’s page in the Viam app. You can run this code directly on the machine or from a separate computer; it then connects to the machine using API keys.

Next steps

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.