periph-servo-pca9685

command module
v0.0.0-...-ad86941 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

periph-servo-pca9685

periph-servo-pca9685 is a Viam modular component that uses the periph.io library to control servos connected to pca9685 channels.

API

The periph-servo-pca9685 resource provides the following methods from Viam's built-in rdk:component:servo API:

Move(angle uint32)
Position()
Stop()

Viam Component Configuration

The following attributes may be configured as periph-servo-pca9685 config attributes. For example: the following configuration set up a servo on I2C bus 0, PCA9685 channel 15:

{
  "i2c_bus" : "0",
  "channel" : 15
}
i2c_bus

string (default: "0")

The name or number of the I2C bus to which the PCA9685 is connected.

channel

int (default: 0)

The channel (0-15) to which the servo to control is connected.

frequency_hz

int (default: 50)

The frequency in hz of the servo to control. See the datasheet for the servo to control.

min_angle_deg

int (default 0)

The minimum angle in degrees to which the servo will be allowed to move.

max_angle_deg

int (default 180)

The maximum angle to in degrees which the servo will be allowed to move.

starting_position_deg

int (default 0)

When the servo is initiated, it will move to this position (in degrees).

min_width_us

int (default 500)

The minimum duty cycle width in microseconds. See the datasheet for the servo to control.

max_width_us

int (default 2500)

The maximum duty cycle width in microseconds. See the datasheet for the servo to control.

Documentation

Overview

package main is a module that implements a servo model supported by a PCA9685 and periph.io

Directories

Path Synopsis
Package pca9685servo implements a servo model supported by a PCA9685 and periph.io
Package pca9685servo implements a servo model supported by a PCA9685 and periph.io

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL