Go Down

Topic: Fragmented Heap with Fast.led (Read 149 times) previous topic - next topic

Leon_F

Apr 12, 2019, 03:37 pm Last Edit: Apr 23, 2019, 05:56 pm by Leon_F
Hey there , i have some problems with my wemos d1 Mini and the FastLed Library / WS2812b . I built a LED Matrix which displays some Animations. When it runs some Animations the free heap gets smaller, it recovers, but not enough, so after 10 Minutes the Wemos loses its connection to the internet and freezes. Maybe its because the memory is too fragmented, since every Animation consists of about 200 Lines of "leds[num_of_ led] = rgbValue". I used F() for all strings. Since the code is about 9000 lines long i wont post it here.
Edit: I found the problem, it was the Fauxmo Esp Library, which enables Alexa support for the esp8266

Grumpy_Mike

Quote
Since the code is about 9000 lines long i wont post it here.
Then sadly we can't say what is wrong. Sorry but do you expect anything else?

CrossRoads

"the code is about 9000 lines long"

So Reply, and use the Attachments button to attach the file, vs posting it.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

PaulRB

#3
Apr 13, 2019, 08:54 am Last Edit: Apr 13, 2019, 10:18 am by PaulRB
every Animation consists of about 200 Lines of "leds[num_of_ led] = rgbValue"
That sounds like a pretty dumb way to code it. So maybe post your code with only 2 animations included. Then it will be short enough for you to post and for us to read, and we can suggest some alternative approaches. For example, it might be better to store the animation data in a file using the Wemos' SPIFFS file system (similar to using an SD card on other Arduino) and have the code read the data from the file for each animation.

Leon_F

"the code is about 9000 lines long"

So Reply, and use the Attachments button to attach the file, vs posting it.
I will do that when I'm at home again, and also clean it up a bit so it's more easy to understand

Go Up