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)