Single array allocation results in "Can't allocate more memory"

I’m having trouble allocating an array. Everything I try seems to result in “Can’t allocate more memory”

export function beforeRender(delta) {
  t1 = time(.1)
  flake_rate = .1
  flake_count = 5
  flakes = array(flake_count) // hold indices of active flakes

I really want to allocate three 150 entry arrays. Is this practical?

This is on a “no button” pixel blaze. I don’t see a way to extract version information anywhere on the web interface.

Oz (in DFW)

Hi @ozindfw,
It looks like you are allocating an array every time beforeRender runs, which is every animation frame. This will quickly eat through all available pattern array memory.

If you only need one array of flakes, allocate that in the main code area (move it outside of a function body).

The sparks pattern might be a good reference.

Three 150 element arrays is definitely possible.

Version information is displayed on the top right status area near FPS and free pattern memory in the white nav bar.


Missed the version information on that field. Mine says:

Status:Connected v2.13 FPS:354.58 Mem:1606 Exp:No

so v2.13

What does the “Exp:no” indicate, and more importantly, where is this documented so I can stop bugging you?

Of course I figured the array issue out just about the exact moment the email notification arrived D’0h!

Oz (in DFW)

Hi Oz! Exp: in the header reports whether a sensor expansion board is found, and if so, the board version.

You’re right, this should be in the docs, so I added it to the Getting Started page. Here’s the new annotated header image:


I think 2.24 is the current firmware. V2.24 - Playlist + atan2 fix