0

I'm using the Neopixel library from jgarff to control my Neopixel LED strips and I want to change the brightness while a animation is running.

In the library I'm using there isn't a command to refresh the brightness, but there is a command that initializes the LED strip.

strip = Adafruit_NeoPixel(LED_COUNT, LED_PIN, LED_FREQ_HZ, LED_DMA, LED_INVERT, LED_BRIGHTNESS, LED_CHANNEL)

I've tried using Multithreading a making a loop which reinitializes the LED strip every 50ms and then changing the LED_BRIGHTNESS variable, but then the animation weren't smooth and only reinitializing the LED_BRIGHTNESS variable gives me an error.

Does somebody have an idea how I could solve this problem?

I'm thankfully for any answers.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • If the library really doesn't provide the functionality you need, you could try adding it. – asynts Mar 21 '21 at 12:29
  • The library you linked to says that the Python interface is deprecated - and the replacement library that it links to does have a `setBrightness()` method. – jasonharper Apr 20 '21 at 19:44

0 Answers0