Is there any way to control brightness of ledlights with oficial neopixel driver? Or mb some forks of it exists (besides LoBoris port)?
Thanks
Neopixel brightness?
Re: Neopixel brightness?
Is it the right way, to change just brighness, but not colour:
Code: Select all
color = [128, 255, 128]
brightness = 5 # brighness in % (0-100)
def bri(pos):
global brightness
pos = round(pos/100*brightness)
return pos
result = list(map(bri, color))
print(result)
Re: Neopixel brightness?
Hey, I know you haven't been back on the site for years, but thanks for this. It works really well!
I've been using it with a smooth dimming curve to get very pleasing results:
As long as the colour animation goes quickly, the small colour shifts caused by rounding aren't noticeable to me.
This is also really handy for stopping close-packed NeoPixel boards (Adafruit NeoPixel FeatherWing, I'm looking at you) from overheating.
I've been using it with a smooth dimming curve to get very pleasing results:
Code: Select all
b = [round(100 * pow(sin(radians(x * 9 / 2)), 2)) for x in range(40)]
This is also really handy for stopping close-packed NeoPixel boards (Adafruit NeoPixel FeatherWing, I'm looking at you) from overheating.