Elixir PCA9685 16 channel 12 bit PWM driver driver
Find a file
2023-01-17 11:29:46 +13:00
config chore: set up git_ops and auto-releasing 2020-12-28 20:37:57 +13:00
lib chode(dev-deps): Update credo to 1.6.1. 2021-12-08 16:27:46 +13:00
test chore: set up git_ops and auto-releasing 2020-12-28 20:37:57 +13:00
.formatter.exs Empty OTP application. 2019-10-07 15:32:17 +13:00
.gitignore Empty OTP application. 2019-10-07 15:32:17 +13:00
.gitlab-ci.yml chore: Change default branch to main. 2021-12-08 16:21:05 +13:00
CHANGELOG.md chore: set up git_ops and auto-releasing 2020-12-28 20:37:57 +13:00
LICENSE.md chore!: Relicense as HL3-FULL. 2023-01-17 11:29:46 +13:00
mix.exs chore!: Relicense as HL3-FULL. 2023-01-17 11:29:46 +13:00
mix.lock chore(deps): update dependency ex_doc to >= 0.28.1 2022-02-21 09:49:26 +13:00
README.md chore!: Relicense as HL3-FULL. 2023-01-17 11:29:46 +13:00
renovate.json chore: Update renovate.json 2021-12-09 11:27:06 +13:00

PCA9685

pipeline status Hex.pm Hippocratic License HL3-FULL

Driver for PCA9685 based 16 channel, 12 bit PWM driver connected over I2C.

Usage

Add your device to your config like so:

config :pca9685,
  devices: [%{bus: "i2c-1", address: 0x40}]

The properties bus and address are mandatory. You can optionally provide pwm_freq which is the output frequency you'd like to set (in Hz) and oe_pin which is the GPIO pin that you want to use for the output-enable function. Remember that the OE pin is expecting to be driven high to +5V, so won't work on a Raspberry Pi without a level shifter of some kind.

Your devices will be reset and you will be able to drive the outputs with your specified output frequency and duty cycle.

Installation

If available in Hex, the package can be installed by adding pca9685 to your list of dependencies in mix.exs:

def deps do
  [
    {:pca9685, "~> 0.1.0"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/pca9685.

License

This software is licensed under the terms of the HL3-FULL, see the LICENSE.md file included with this package for the terms.

This license actively proscribes this software being used by and for some industries, countries and activities. If your usage of this software doesn't comply with the terms of this license, then contact me with the details of your use-case to organise the purchase of a license - the cost of which may include a donation to a suitable charity or NGO.