Snake game on 32x32 LED matrix

I’m currently trying to make the snake-game on a 32x32 LED-matrix. To do this i use the library for the LED-matrix from GitHub - adafruit/RGB-matrix-Panel: Arduino library and example code for the 16x32 RGB matrix panels in the shop. However, when the snake gets to big, it doesn’t work and the LED-matrix displays just random light. I think it has something to do with lack of memory (I’m using an arduino uno). I have tried to change my ints to bytes to make it work better, but it doesn’t make a big difference. Can anyone maybe give me some guidance? Is there a more effective way of representing the snake?

See attachment for the code I’m using.

snake.ino (3.61 KB)

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

How are you powering the LED array, the arduino will not be able to supply enough current to support all the arrays.

Tom… :slight_smile:

I don't think that's the problem. Because the examples that followed with the matrixpanel-library works very well, and they use all the LED-lights in the matrix.

Hi,

The program has nothing to do with how much current is being consumed.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

A picture of your project would also help.

Tom... :)