Any luck with this?
TrickLED - NeoPixel WS2812B Animation Library
Re: TrickLED - NeoPixel WS2812B Animation Library
Hi Sgar, YES that worked! I first downgraded to MP 1.14 and tried everything. I might have put all the files in the /lib sub_dir instead of giving trickLED its own sub-dir on the ESP32. Now the demo file runs without a hitch also on MP 1.15.Any luck with this?
Thanks a lot:)
Re: TrickLED - NeoPixel WS2812B Animation Library
Nice! If you achieve to change the brightness in animations please share!Primesty wrote: ↑Sun May 23, 2021 4:27 pmHi Sgar, YES that worked! I first downgraded to MP 1.14 and tried everything. I might have put all the files in the /lib sub_dir instead of giving trickLED its own sub-dir on the ESP32. Now the demo file runs without a hitch also on MP 1.15.Any luck with this?
Thanks a lot:)
Re: TrickLED - NeoPixel WS2812B Animation Library
Will do!Nice! If you achieve to change the brightness in animations please share!
Re: TrickLED - NeoPixel WS2812B Animation Library
Hi @sgar,
You might have figured this out already, but there is a global brightness setting in the trickLED.py file, which you might be able to manipulate:
The various animation functions also all have brightness setting, which you might be able to manipulate.
Since
Maybe that helps
You might have figured this out already, but there is a global brightness setting in the trickLED.py file, which you might be able to manipulate:
Code: Select all
global_setings = {
'brightness': 200,
'interval': 60,
'palette': None,
'animation': None
}
Code: Select all
class AnimationBase:
""" Animation base class. """
def __init__(self, leds, interval=50, palette=None, generator=None, brightness=200, **kwargs):
"""
:param leds: TrickLED object
:param interval: millisecond pause between each frame
:param palette: color palette
:param generator: color generator
:param brightness: set brightness 0-255
:param kwargs: additional keywords will be saved to self.settings
"""
seems to inherit fromMappedAnimationBase
and Fire, in turn, inherits fromAnimationBase
you might be able to feed the brightness parameter into it.MappedAnimationBase
Maybe that helps
-
- Posts: 1
- Joined: Mon Dec 27, 2021 8:43 pm
Re: TrickLED - NeoPixel WS2812B Animation Library
Not sure if it's appropriate to reply on this post, but I believe that MP 1.17 has introduced an issue. While working well at MP 1.15, when the demo is loaded and run under 1.17 it throws an error:
Demonstrating animations press CTRL+C to cancel... or wait about 2 minutes.
LitBits settings: default
Traceback (most recent call last):
File "<stdin>", line 181, in <module>
File "<stdin>", line 51, in demo_animations
File "<stdin>", line 39, in play
File "neopixel.py", line 1, in fill
TypeError: 'int' object isn't subscriptable
I am using Thonny on an ESP32 (NodeMCU).
There's just too much functionality to sacrifice in the rewrite of my principal code to remain at 1.15, so I'll have to live without animations and generators for now (sadly).
If there's any further info I can provide, please let me know.
Demonstrating animations press CTRL+C to cancel... or wait about 2 minutes.
LitBits settings: default
Traceback (most recent call last):
File "<stdin>", line 181, in <module>
File "<stdin>", line 51, in demo_animations
File "<stdin>", line 39, in play
File "neopixel.py", line 1, in fill
TypeError: 'int' object isn't subscriptable
I am using Thonny on an ESP32 (NodeMCU).
There's just too much functionality to sacrifice in the rewrite of my principal code to remain at 1.15, so I'll have to live without animations and generators for now (sadly).
If there's any further info I can provide, please let me know.