Navigate to the CONFIGURE tab on your machine’s page in the Viam app.
Follow the setup instructions that appear on your new machine’s CONFIGURE page to install viam-server on your computer and connect it to the Viam app.
Step 3: Configure a camera
From the CONFIGURE tab on your machine’s page in the Viam app, click the + icon next to your machine part in the left-hand menu and select Component.
Select the camera type, then select the webcam model.
Enter a name or use the suggested name for your camera and click Create.
Click the Save button in the top right corner of the page to save your config.
Go to the CONTROL tab and expand the camera’s remote control card to test the camera stream.
If you don’t see an image stream, configure the video_path attribute.
For more detailed information, including optional attribute configuration, see the webcam docs.
Step 4: Configure data capture on the camera
Return to the CONFIGURE tab on your machine’s page in the Viam app.
Locate the configuration card for your camera.
Click the Add method button.
When the Create data management service prompt appears, click to add the service to your machine.
Leave the default settings.
Scroll back up to your camera config card.
In the Data capture section:
Click the Method dropdown and select ReadImage.
Set the frequency to 0.1 to capture an image every 10 seconds.
In the upper banner of the Viam app, click DATA to see the captured images displayed.
If you do not see images from your camera, try waiting a minute and refreshing the page to allow time for the images to be captured and then synced to the app at the interval you configured.
Navigate to the CONFIGURE tab of your machine’s page in the Viam app.
Follow the setup instructions that appear on your new machine’s CONFIGURE page to install viam-server on your computer and connect it to the Viam app.
Step 3: Configure a board
Most sensors need to be wired to the pins of a single-board computer such as a Raspberry Pi.
Add a board component to your config:
Important
If your sensor uses I2C, SPI, or serial port communication, you need to enable that type of communication in your board’s settings.
For example, if you are using a Raspberry Pi, SSH to it and enable serial communication in raspi-config.
Step 4: Configure a sensor
Search the supported sensor models for a model of sensor that is compatible with your sensor hardware.
For example, if you have a Sensirion SHT3x-DIS temperature and humidity sensor, you should use the sensirion-sht3xd model of sensor.
Once you determine which model to use, add it to your machine’s configuration:
From the CONFIGURE tab of your machine’s page in the Viam app, click the + icon next to your machine part in the left-hand menu and select Component.
Select the sensor type, then select the model that matches your hardware.
Enter a name or use the suggested name for your sensor and click Create.
Add required attributes, such as information about how the sensor is connected to the board.
You can find information on these attributes by clicking the name of your sensor model in the supported models list.
Click the Save button in the upper right corner of the page to save your configuration.
Go to the CONTROL tab and expand the sensor’s remote control card to test the sensor.
Click Get readings.
If you don’t see the latest reading from the sensor, check that your sensor is properly wired to the board, and that the type of communication the sensor uses is enabled on the board (if applicable).
Important
If your sensor uses I2C, SPI, or serial port communication, you need to enable that type of communication in your board’s settings.
For example, if you are using a Raspberry Pi, SSH to it and enable serial communication in raspi-config.
Step 5: Configure data capture on the sensor
Return to the CONFIGURE tab on your machine’s page in the Viam app.
Locate the configuration card for your sensor.
Click the Add method button.
When the Data management service missing alert appears, click Create data management service to add the service to your machine.
Leave the default settings.
Scroll back up to your sensor configuration card.
In the Data capture section:
Click the Method dropdown and select Readings.
Set the frequency to 0.05 to capture a sensor reading once every 20 seconds.
In the upper banner of the Viam app, click DATA to see the captured sensor data displayed.
If you do not see data from your sensor, try waiting a minute and refreshing the page to allow time for the readings to be captured and then synced to the app at the interval you configured.
Next steps
Now that you have captured data, try training a computer vision model on your images, or query your sensor data: