Skip to content

viam-modules/nvidia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This nvidia module implements an NVIDIA Jetson Orin Module and Developer Kit, NVIDIA Jetson AGX, or NVIDIA Jetson Nano using the rdk:component:board API.

Note

Before configuring your board, you must create a machine.

Caution

The GPIO pins on Jetson boards are rated for 3.3V signals. 5V signals from encoders and sensors can cause damage to a pin. We recommend selecting hardware that can operate 3.3V signals or lower. For details, see your board's specification. For the Jetson Nano, see pages 1-3 of the Jetson Nano Developer Kit 40-Pin Expansion Header GPIO Usage Considerations Applications Note.

Setup

Configure your jetson board

Navigate to the CONFIGURE tab of your machine in the Viam app. Add board / nvidia:jetson to your machine.

Note

For more information, see Configure a Machine.

Attributes

The following attributes are available for viam:nvidia:jetson boards:

Attribute Type Required? Description
digital_interrupts object Optional Any digital interrupts's pin number and name.

For instructions on implementing digital interrupts, see Digital interrupt configuration

Example configuration

viam:nvidia:jetson

  {
     "name": "<your-nvidia-jetson-board-name>",
      "model": "viam:nvidia:jetson",
      "type": "board",
      "namespace": "rdk",
      "attributes": {},
      "depends_on": []
  }

Next Steps

  • To test your board, expand the TEST section of its configuration pane or go to the CONTROL tab.
  • To write code against your board, use one of the available SDKs.
  • To view examples using a board component, explore these tutorials.

Digital interrupt configuration

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 adding the following to your board's attributes configuration:

{
  "digital_interrupts": [
    {
      "name": "<your-digital-interrupt-name>",
      "pin": "<your-digital-interrupt-pin-number>"
    }
  ]
}

Attributes

The following attributes are available for digital_interrupts:

Name Type Required? Description
name string Required Your name for the digital interrupt.
pin string Required The pin number of the board's GPIO pin that you wish to configure the digital interrupt for.

Example configuration

{
  "components": [
    {
      "name": "<your-up-upboard-board-name>",
      "model": "viam:up:upboard",
      "type": "board",
      "namespace": "rdk",
      "attributes": {
        "digital_interrupts": [
          {
            "name": "your-interrupt-1",
            "pin": "15"
          },
          {
            "name": "your-interrupt-2",
            "pin": "16"
          }
        ]
      }
    }
  ]
}