Is it possible to change the brighness on the fly for Adafruit_CircuitPython_NeoPixel

668 views Asked by At

Is it possible to change the brightness on the fly for Adafruit_CircuitPython_NeoPixel ?

It seems to be possible in a C library but no in python.

Thanks, mcb

2

There are 2 answers

0
Sinai On

You have to deinit() the pixel object and reinitialize it with the new brightness.

pixel.deinit()
pixel = neopixel.NeoPixel(pixel_pin, number_pixel, brightness=new brightness)
2
Tim Roberts On

neopixel derives from Pypixelbuf, and inherits a brightness property from that module. Did you try it?