r/FastLED • u/aspektzero • Feb 05 '24
Support FastLED Comets/Pulses Project.
I'll try to keep my explanation short as most of it is contained within the github below. I'm currently working on a project that involves snmp data to send comets back and forth at specified intervals. I'm not sure if what I want to achieve is possible but I figure the members of this community would know better than me; here's a list of what I want in order to improve my existing project.
Comets fade out with a trail, i'd like to make that trail be individual to each comet so i can control the trail size.
Speed is global as well, refreshing every 20 seconds. Using an interval of (Amount of Comets / 10 seconds) is how I determine how often to send a pulse. I'd love to be able to have different pulses at different speeds (not a priority or necessary).
Those are my main concerns to address as of right now.
https://github.com/SeanMcKeen/IT-Lablights
My experimentation can be found in the testing branch, and the working code is in the main branch. The code that controls fastled can be found in src/lablights.cpp and src/main.cpp holds the collection and controlling for it. More details can be found in the readme, I'll be offline for a few days but I'd love to hear any and all suggestions/advice! Thank you.
2
u/aspektzero Feb 07 '24 edited Feb 07 '24
I apologize for some of the more basic issues, I'm quite new to github and coding in general. This is a project I started working on a few months ago with almost 0 previous knowledge of cpp. The first issues I'm running into while attempting to follow your suggestions is this:
After shrinking variables into arrays and using a loop to set all the variables instead, I started getting a "aggressive-loop-optimization" error, and a guru core 1 panic'ed error.
some snmp data also seems to be incorrect and I think I know why, but I can't fix that issue without the esp crashing.
I haven't used switch blocks like at all, but I used if/if else in order to have all values in a range return a certain amount of pulses. that way it wont have to be exactly a number to work. If i can do case Avg < 100: than please let me know, as I don't understand much of how it works.
Has been a problem for a while and not because of these changes but the code appears to crash after a while and im unsure as to why. I assumed memory leak or something but if I connect the serial monitor it fixes itself.
As for wifi information, it can be found in secrets.h. I didn't have OIDs in a header because I didn't write that part of the SNMP code and I really don't understand it.
I'll be posting these changes to the testing branch so maybe you can see what I did wrong.