Configure an UP Board

Configure an upboard board to integrate an Intel-based board like the UP 4000 into your machine.

Complete the following setup requirements, then move on to configuring your board in the Viam app:

Setup requirements

You must flash your Intel-based board with:

  1. The Ubuntu "Server install image" version of the operating system. For example, ubuntu-22.04.2-live-server-amd64.iso. Follow these instructions to install Ubuntu Server.
  2. The pin control driver. This driver is necessary to stabilize the GPIO pin mapping definition on the board, making the pin mapping identical to that of a Raspberry Pi. Follow these instructions to install the pin control driver.

Navigate to the Config tab of your machine’s page in the Viam app. Click on the Components subtab and click Create component. Select the board type, then select the upboard model. Enter a name for your board and click Create.

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

Copy and paste the following attribute template into your board’s Attributes box. Then remove and fill in the attributes as applicable to your board, according to the table below.

{
  "digital_interrupts": [
    {
      "name": "<your-digital-interrupt-name>",
      "pin": "<pin-number>"
    }
  ]
}
{
  "digital_interrupts": [
    {
      "name": "your-interrupt",
      "pin": "18"
    }
  ]
}
{
  "components": [
    {
      "name": "<your-upboard-board>",
      "model": "upboard",
      "type": "board",
      "namespace": "rdk",
      "attributes": {
        "digital_interrupts": [
          {
            "name": "<your-digital-interrupt-name>",
            "pin": "<pin-number>"
          }
        ]
      },
      "depends_on": []
    }
  ]
}
{
  "components": [
    {
      "name": "<your-upboard-board>",
      "model": "upboard",
      "type": "board",
      "namespace": "rdk",
      "attributes": {
        "digital_interrupts": [
          {
            "name": "your-interrupt",
            "pin": "18"
          }
        ]
      },
      "depends_on": []
    }
  ]
}

The following attributes are available for upboard boards:

NameTypeInclusionDescription
digital_interruptsobjectOptionalAny digital interrupts’s pin number and name. See configuration info.

Attribute configuration

Configuring these attributes on your board allows you to integrate digital interrupts into your machine.

digital_interrupts

Interrupts are a method of signaling precise state changes. Configuring digital interrupts to monitor GPIO pins on your board is useful when your application needs to know precisely when there is a change in GPIO value between high and low.

  • When an interrupt configured on your board processes a change in the state of the GPIO pin it is configured to monitor, it calls Tick() to record the state change and notify any interested callbacks to “interrupt” the program.
  • Calling GetGPIO() on a GPIO pin, which you can do without configuring interrupts, is useful when you want to know a pin’s value at specific points in your program, but is less precise and convenient than using an interrupt.

Integrate digital_interrupts into your machine in the attributes of your board by adding the following to your board’s JSON configuration:

// "attributes": { ... ,
"digital_interrupts": [
  {
    "name": "<your-digital-interrupt-name>",
    "pin": "<pin-number>",
  }
]
{
  "components": [
    {
      "model": "pi",
      "name": "your-board",
      "type": "board",
      "attributes": {
        "digital_interrupts": [
          {
            "name": "your-interrupt-1",
            "pin": "15"
          },
          {
            "name": "your-interrupt-2",
            "pin": "16"
          }
        ]
      }
    }
  ]
}

The following properties are available for digital_interrupts:

NameTypeInclusionDescription
namestringRequiredYour name for the digital interrupt.
pinstringRequiredThe pin number of the board’s GPIO pin that you wish to configure the digital interrupt for.
typestringOptionalOnly applies to pi model boards.
  • basic: Recommended. Tracks interrupt count.
  • servo: For interrupts configured for a pin controlling a servo. Tracks pulse width value.


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.