Close

Memory management

A project log for Arduino Tetris clone with MAX7219 8x8 Matrix

A simple Tetris-style game implemented with an 8x8 LED Matrix, driven by a MAX7219 and Arduino UNO host.

JasonJason 05/29/2020 at 17:290 Comments

I've learned that my code for this (and a subsequent project) was apparently sub-optimal for microcontroller programming. Despite being conscious of the scope and duration of my variables, it seemed that iteratively creating and destroying variables in a loop was somehow running the UNO out of memory. That's why my Tetris game (and scrolling Marquee, now fixed) would suddenly stop after just a few iterations.

Discussions