Neopixel brightness?
Posted: Sat Feb 08, 2020 2:24 pm
Is there any way to control brightness of ledlights with oficial neopixel driver? Or mb some forks of it exists (besides LoBoris port)?
Thanks
Thanks
Please see the new forum at
https://forum.micropython.org/
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)
Code: Select all
b = [round(100 * pow(sin(radians(x * 9 / 2)), 2)) for x in range(40)]