Animation Library question

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Draculen
 
Posts: 72
Joined: Mon Jan 24, 2022 11:14 pm

Animation Library question

Post by Draculen »

Originally I was trying to study to see if it was possible to have multiple animations playing at once (the comet animation as a meteor shower to be specific, neopixels). But then I had a thought

Theater chase would be the optimal animation for my project if it is possible to give the neopixels in the middle/end of the Neopixels lighting up the ability to fade out rather
than the instantaneous On -> Off they usually do. How would one achieve an effect like this? I was going over the nested script for theater chase but came up empty handed. Any advice would be greatly appreciated

User avatar
mikeysklar
 
Posts: 13936
Joined: Mon Aug 01, 2016 8:10 pm

Re: Animation Library question

Post by mikeysklar »

Increasing the tail value for the comet animation should give you a long strip of LEDs fading out.

Code: Select all

comet = Comet(pixels, speed=0.01, color=PURPLE, tail_length=20, bounce=True)

while True:
    comet.animate()
You might need to get to a lower level of customization for the effects you are looking for.

You could break the LED segment into shorter strips and assign the NeoPixels to multiple pins so you can back to back effects.

Another option would be to take a look at the FancyLED library which overs a lot of control and cool builtins.

https://learn.adafruit.com/fancyled-lib ... n/overview

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”