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

To test your board as you configure it, power it on. If you plan to connect hardware to the board’s pins, connect the hardware while it’s powered off. 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 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 board type, then select the upboard model. Enter a name or use the suggested name for your board and click Create.

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

Edit the attributes as applicable to your board, according to the table below.

{
  "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:

NameTypeRequired?Description
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 ticks to record the state change. You can stream these ticks with the board API’s StreamTicks(), or get the current value of the digital interrupt with Value().
  • 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 following the Config Builder instructions, or by adding the following to your board’s JSON configuration:

On your board’s panel, click Show more, then select Add digital interrupt. Assign a name to your digital interrupt and then enter a pin number.

An example configuration for digital interrupts in the Viam app Config Builder.

// "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:

NameTypeRequired?Description
namestringRequiredYour name for the digital interrupt.
pinstringRequiredThe pin number of the board’s GPIO pin that you wish to configure the digital interrupt for.

Test digital_interrupts

Once you have configured your digital interrupts, open the board’s TEST panel on the CONFIGURE or CONTROL tabs to monitor interrupt activity. The value displayed next to each interrupt name represents the total count of interrupts triggered by the corresponding digital interrupt.

Digital interrupts in the test panel.

Troubleshooting

If your board is not working as expected, follow these steps:

  1. Check your machine logs on the LOGS tab to check for errors.
  2. Review this board model’s documentation to ensure you have configured all required attributes.
  3. Check that all wires are securely connected.
  4. Click on the TEST panel on the CONFIGURE or CONTROL tab and test if you can use the board there.

If none of these steps work, reach out to us on the Community Discord and we will be happy to help.

Next steps

For more configuration and usage info, see:

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.