The code below is simplified but I am driving some common anode RGB LEDs, so the PCA9685 is being used to sink the current on each of the LED's color channels. So, in theory, 0 should be on and 4095 should be off. This works mostly except that in the off state the LED is every so slightly still on.
It looks like since it's defaulting to low, it takes at least 1 of the 4096 steps before it switches to high (which would turn the LED off in my case).
I'd imagine this would apparently work for a common cathode setup, but I'd really like to use common anode.
Is there any way to get the LEDs to fully turn off?
Code: Select all
//using the PCA9685 to sink the current to the LED
pwm.setPWM(0, 0, 0); //on
delay(1000);
pwm.setPWM(0, 0, 4095); //off
delay(1000);