Close

Complete Code Rewrite

A project log for RGB LED matrix panels (Arduino)

Demo loops and interactive games and displays made with Arduino Uno and Mega Controlling 32x32, 32x64 and 64x64 RGB Matrix panels

Joshua SnyderJoshua Snyder 10/10/2016 at 19:280 Comments

I had waited long enough, and a complete code rewrite from procedural flat C to OO C++ model.

Advantages of OO redesign:

*Memory Management: Due to the constraints of up to 64x64 RGB pixels on an arduino Mega, memory management had been key in the original implementation of the code. Moving the code to OO C++ would normally mean leaving even more of the memory in the hands of the compiler, but inorder to force reuse of the pool of available RAM, I wrote my own memory management routines, and each Mode or Module that runs on the device can clear out and use as required this same buffer of ram, that only has to be allocated once. Previous versions of the code had approached maximum allocation, forcing reuse of global variables such that adding one more 8Bit int could cause the code to no longer execute.


Discussions