Hi there,
I'm trying to control a set of RGBW leds with the 16CH pwm module. I need to control the color via HSB. The problem is that, for the 16CH pwm, the values domain is 0 to 4095 while from the HSB colour library I get values form 0 to 255 and the mapping to a bigger domains doesn't work really well since you do not get a even numbers distribution and then colour fade is not smooth. So I wonder if there is something that can be done form the side of the 16ch pwm module to make it more friendly to control LEDs. Is it possible to change the inputs domain?
Looking forward to hearing form you.
Best,
Marco
16-Channel PWM and HSBColor.h
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88091
- Joined: Sat Feb 07, 2009 10:11 am
Re: 16-Channel PWM and HSBColor.h
It is an even multiple of 2^4. (shift left 4). That should be an even distribution.mapping to a bigger domains doesn't work really well since you do not get a even numbers distribution
The PWM resolution 16x your table resolution (12 bits vs 8 bots) so the device is capable of much finer resolution than your HSB table is capable of utilizing. To get smoother fades, you would need a higher resolution HSB table.
Please be positive and constructive with your questions and comments.