Skip to content

viam-modules/pca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This pca module implements a PCA9685 Arduino I2C Interface using the rdk:component:board API.

Note

Before configuring your board, you must create a machine.

Configure your pca9685 board

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

On the new component panel, copy and paste the following attribute template into your board's attributes field:

{
  "name": "<your-i2c-bus-index>",
  "i2c_address": <int>
}

Attributes

The following attributes are available for viam:pca:pca9685 boards:

Attribute Type Required? Description
i2c_bus string Required The index of the I2C bus on the board with GPIO pins your pca9685 is connected to. Often a number.
Example: ”1”
i2c_address int Optional The PCA9685's unique I2C address.

Example configuration

viam:pca:pca9685

  {
      "name": "<your-pca-pca9685-board-name>",
      "model": "viam:pca:pca9685",
      "type": "board",
      "namespace": "rdk",
      "attributes": {
        "i2c_bus": "1",
        "i2c_address": 127
      },
      "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.