Configure a pi board

Configure a pi board to integrate a Raspberry Pi 4, Raspberry Pi 3 or Raspberry Pi Zero 2 W into your robot:

Navigate to the Config tab of your robot’s page in the Viam app. Click on the Components subtab and navigate to the Create component menu. Enter a name for your board, select the type board, and select the pi model.

Click Create component.

An example configuration for a pi board in the Viam app Config Builder.

Edit and fill in the attributes as applicable.

{
  "components": [
    {
      "type": "board",
      "model": "pi",
      "name": "<your_name>"
    }
  ]
}

The following attributes are available for pi boards:

NameTypeInclusionDescription
analogsobjectOptionalAttributes of any pins that can be used as analog-to-digital converter (ADC) inputs. See configuration info here.
digital_interruptsobjectOptionalAny digital interrupts’s pin number and name. See configuration info here.
spisobjectOptionalAny Serial Peripheral Interface (SPI) chip select pins’ bus index and name. See configuration info here. Review these instructions to learn how to enable SPI on a Raspberry Pi 4.
i2csobjectOptionalAny Inter-Integrated Circuit (I2C) pins’ bus index and name. See configuration info here. Review these instructions to learn how to enable I2C on a Raspberry Pi 4.


Have questions, or want to meet other people working on robots? Join our Community Discord.