Hey guys i was hoping i could get some help im running into an

Hey guys i was hoping i could get some help im running into an issue with running out of dynamic memory. Ive been using attiny85 chips to run strips of LEDs in the past but now im trying to run a strip of 175 LEDs for a christmas decoration and the dynamic memory being used when i compile it is 660 and the attiny only has 512 available. Im using a strip of WS2812B LEDs. If i lower the number of LEDs the dynamic memory being used also goes down but i need all 175 to take up the length of the decoration im wanting to put up. Can you guys help me?

I’d suggest a better processor, either a Teensy 3.2 or an ESP8266 board like the WeMos D1 mini.

The alternative is to cut the LEDs in half and then drive both halves off the same pin. Then you only need 88 LEDs in the sketch.

It’s also helpful to post your code on gist of similar incase anyone can see any other ways of helping :wink:

Well i had 100 custom boards made for the Attiny85 lol
missing/deleted image from Google+

Post the code, I regularly run simple animations on a nano 328p with 250 LEDs

http://pastebin.com/Bz6WC57B

Now this is the code i wrote for another project. I really only need the confetti patterns. But even by itself it still uses over 600 bytes of dynamic memory :confused:

It’s pretty simple math. With 175 leds at 3 bytes per led your leds array is going to be 525 bytes - that’s more than the 512 bytes of ram the attiny85 has - and that’s even before you factor in any other memory overhead.

But when using the NeoPixel library at 175 leds it doesnt even take up 100 bytes…

That’s because the neopixel library will attempt to dynamically allocate that 525 bytes at runtime - which will also fail and cause weird behaviors if it works at all without locking up

Dang it… i really need all 175 for a christmas decoration lol

Any suggestions on running this on a lilypad arduino?

But wouldnt that just mirror the same pattern on every strip?

I’m not an expert, but I’ll have a look at it later today

Nice boards, what are they for?

missing/deleted image from Google+

You could use a CD74HC4067 to send the signal to different elements of the strip. If you split the strip in half ,( or thirds or quarters) then 88 leds at 3 bytes each would use 264 bytes of ram. You can calculate one half of the pattern and call FastLED(show), calculate the second half, switch the pin via the CD74HC4067 and then call FastLED(show) again. It won’t be fast but it would allow you to have an animation or pattern over the whole strip with the limited amount of memory. CD74HC4067 breakouts are reasonably small, dirt cheap and readily available.

Hmmmm… ill definitely look into it lol

Do you think you could help me figure out what i need to chance in my code to make this work?

Im still a bit of a noob on the software

I’m confused… the decoration is the tie that shows a couple dozen LEDs? But you need to drive 175 LEDs?

And (ouch!) you ordered 100 custom boards without testing first?