PCA9685

2.0.2

PCA9685 I2C Driver for Swift
Kaiede/PCA9685

What's New

Swift 4 Package Manager Support

2018-10-05T17:54:26Z

PCA9685 already supported building against Swift 4.x, but now it supports the package manager natively. Because 4.2 is now issuing warnings around the Swift 3 package manager being deprecated, it is more important to make sure the new manifest is ready to go for when Swift 5 shows up.

PCA9685

Build Status Swift Swift MIT license

Raspbian

A Swift driver for the PCA9685 PWM controller over I2C, using SwiftyGPIO.

Getting Started

A simple example looks like this:

// It doesn't really matter what Raspberry Pi Board you use.
// C.H.I.P. should also work.
let pca9685 = PCA9685(supportedBoard: .RaspberryPiPlusZero)

// This sets the frequency for all channels
// Range: 24 - 1526 Hz
pca9685.frequency = 1440 // Hz

// Can set an individual channel's on and off steps.
// Range: 0 - 4095 Steps
// Example: ~50% Duty Cycle
pca9685.setChannel(0, onStep: 0, offStep: 2048)

// Or all channels at once
pca9685.setAllChannels(onStep: 0, offStep: 0)

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

  • Adam Thayer - Initial work - Kaiede

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Description

  • Swift Tools 4.0.0
View More Packages from this Author

Dependencies

Last updated: Wed Mar 13 2024 22:42:49 GMT-0900 (Hawaii-Aleutian Daylight Time)