PCA9685.Device (pca9685 v1.0.0)

Allows setting of PWM values and update frequency on a PCA9685 device.

Link to this section Summary

Functions

Sets all channels to the specified duty cycle.

Sets the channel to a specified duty cycle.

Disables PWM output for this device.

Enables PWM output for this device.

Returns the currently configured PWM frequency.

Configures the PWM frequency.

Link to this section Functions

Link to this function

all(device_name, on, off)

Sets all channels to the specified duty cycle.

Link to this function

channel(device_name, channel, on, off)

Sets the channel to a specified duty cycle.

Link to this function

output_disable(device_name)

Specs

output_disable(term()) :: :ok | {:error, term()}

Disables PWM output for this device.

Fails if there is no oa_pin specified in the device configuration.

Link to this function

output_enable(device_name)

Specs

output_enable(term()) :: :ok | {:error, term()}

Enables PWM output for this device.

Fails if there is no oa_pin specified in the device configuration.

Link to this function

pwm_freq(device_name)

Returns the currently configured PWM frequency.

Link to this function

pwm_freq(device_name, hz)

Configures the PWM frequency.