Integrate supported hardware

Viam supports a wide variety of sensors, cameras, and other physical hardware, with APIs for each of the following types of hardware:

These standardized APIs are implemented by modules that provide drivers for specific models of hardware.

Any hardware that is not already supported by a Viam module can be added into Viam’s system of modular resources by creating a new module that provides a driver for the hardware.

Supported hardware

Many modules are designed to run alongside the full version of viam-server, which runs on 64-bit architectures such as single-board computers and laptop/desktop computers running 64-bit Linux, as well as macOS.

Other modules are designed to run on microcontrollers alongside viam-micro-server.

For use with 64-bit architecture

The following modular components are available for computers and SBCs running viam-server.

Search for the name, model number, or manufacturer name of your hardware to see if there is already a hardware driver (component model) for it. Also try searching by broader category name, for example “webcam” or “motor,” since some components do not require drivers that are specific to their exact make and model.

Model
Description

For use with ESP-32 microcontrollers

The following is a selection of components (some built-ins and some modules) written for use with viam-micro-server. To use any of the built-in components, configure them according to their readmes. To use a module with viam-micro-server, you need to build firmware that combines viam-micro-server with one or more modules.

ModelDescriptionBuilt-in
gpioA servo controlled by GPIO pins. Configuration info.Yes
two_wheeled_baseA robotic base with differential steering. Configuration info.Yes
free_heap_sensorShips with viam-micro-server. GitHub repo.No
wifi_rssi_sensorShips with viam-micro-server. GitHub repo.No
moisture_sensorGitHub repo.No
water_pumpGitHub repo.No

Configure hardware on your machine

After installing viam-server or viam-micro-server on your computer or microcontroller, you can configure hardware components on your machine’s page in the Viam app:

  1. Click the + button on your machine’s CONFIGURE tab.

  2. Click Component, then select from available components from the Viam Registry (as well as built-in resources).

  3. Use the link to the module README to find information on configuring that specific component.

    When you add a modular resource from the registry, the module that provides it is automatically added at the same time, generating a configuration card for the modular resource and a separate one for the module. If you add a built-in component, there will only be a configuration card for the component.

    For details on configuring versioning and environment variables for modules, see Modular Resource and Module Configuration Details.

Configure virtual hardware components

In addition to physical hardware, there are “virtual” hardware modules that do not directly drive any physical hardware, but rather augment physical hardware with another layer of abstraction, or add other functionality, for example:

These software-only “hardware” modules implement the same component APIs as physical hardware modules, and are configured in the same way as other components.

Add software services to your machine

In addition to hardware driver components and abstracted “virtual hardware” components, Viam offers services to provide higher-level software capabilities. You can read more about the Viam-maintained services and how to configure them in their respective documentation:

To add a service to your machine:

  1. Click the + button on your machine’s CONFIGURE tab.
  2. Click Service, then select from available services. The dropdown list includes services from the Viam Registry as well as the built-in services.
  3. Add required attributes according to the README or other documentation.

How modules run

Modules run alongside viam-server as separate processes, communicating with viam-server over UNIX sockets. When a module initializes, it registers its model or models and associated APIs with viam-server, making the new model available for use. viam-server manages the dependencies, start-up, reconfiguration, data management, and shutdown behavior of your modular resource.