togethernessnyc wrote:Thanks! Can you recommend any code for creating a fading array?

I don't know of an LED fading library that works with that specific chip, but the servo library for that board (https://github.com/adafruit/Adafruit-PW ... er-Library) gives you enough pieces to build a working fade system. You can set the overall PWM frequency, and tell each of the 16 channels what PWM duty cycle to use.

An untested, off-the-top-of-my-head version of the algorithm for a single channel would look like this:

The general idea is that the pulse starts narrow, gets wide, then gets narrow again. Making that work at random times and for 16 channels would require additional bookkeeping, but the basic 'change the light intensity' code would be pretty much the same.

togethernessnyc wrote:Also, how would this work with the PCA9685? Does it have to be connected to the Arduino at all times to work?

To fade, yes. To keep the LEDs going at a specific level, no.

The PCA9685 is a 'free running' PWM controller. Tell it what to do, and it will keep doing that until you tell it to do something else. If you wanted to set the LEDs to a specific intensity and keep them there, you could disconnect the Arduino until you wanted the LEDs to do something else. To make a fade work, you have to keep changing the duty cycles at short time intervals so people see a smooth change from low-intensity light to high-intensity light. The Arduino has to remain connected to keep supplying the new values.

When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.