One of the other things that will be coming with 2.1 is much more

One of the other things that will be coming with 2.1 is much more memory efficiency. On things like the due and teensy 3/3.1, this isn’t that big of a deal, but on the uno, with only 2k of ram, and even more importantly, on the trinket, with 512 bytes of ram, memory is a bit tighter.

I’ve now got one of the demo/calibration/color torture tests that mark and I use running on a trinket, with 110-120 leds. (E.g. 64-70% of memory available for use for led data. The rest is taken up by the stack, a lookup table that is used for sin16, and some global data pointers).

Follow up - 32 bytes of the 152-162 bytes of ram remaining is used by a lookup table used by sin16.

I think I want to track down where the rest of the 120-130 bytes are being used up. AVR does a lot of stack pushing, and so I suspect that some of that ram is used by a stack full of stored registers. I should see if there’s any ways to trim that down further.

And actually, i think I have a way to drive nearly 700 LEDs off of a trinket. I’ll let you folks do that math on 700 LEDs with 512 bytes of ram, total :slight_smile:

Whoah. This would be awesome. The problem I ran into on the Yun was that after 1728 bytes of “framebuffer” for my 576 pixels, there wasn’t enough RAM left for the Bridge library, so I couldn’t read from the SD card.

I abandoned that line of inquiry for my “deadline” the other week, but I’ll get back to poking at it next weekend maybe.