Configure a pca9685 board

Configure a pca9685 board to integrate a PCA9685 Arduino I2C Interface 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 pca9685 model.

Click Create component.

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

Edit and fill in the attributes as applicable.

  "components": [
      "name": "<your-pca9685-board>",
      "type": "board",
      "model": "pca9685",
      "attributes": {
        "board_name": "<your-board-name>",
        "i2c_name": "<your-bus-name>"
      "depends_on": []

The following attributes are available for pca9685 boards:

board_namestringRequiredThe name of the board with GPIO pins your pca9685 is connected to.
i2c_namestringRequiredThe name of the Inter-Integrated Circuit (I2C) bus on your GPIO board where the connection to the pca9685 device is made. See configuration info here.
i2c_addressintOptionalThe pca9685’s I2C address.
pwm_frequency_hzintOptionalThe frequency (in Hz) used for PWM control. Should be between about 24 to 1526 Hz.

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