While working on the next release of PixelMaestro, I came across a problem of storing long-term data on an Arduino. I have a system in place where configuration changes are sent to an Arduino over USB as byte arrays, and as the Arduino reads the array it applies the changes. The problem is those changes disappear as soon as you restart the device. How, then, does one store persistent data without having to add an SD card or extra memory? Enter EEPROM.
On today’s episode of “Adventures in C++”: sending commands between two Arduinos running the same software. Not just data, but also instructions on how to process and execute that data. Even more, these commands have to be small enough for each Arduino to package, send, receive, unpack, and execute in less than 1/10th of a second.
One of the coolest things about C++ is how flexible the language is. If you’re faced with a problem that has no apparent solution, chances are you’re just not approaching it from the right angle.
This is the first public release of PixelMaestro, a C++ library for generating 2D animations!
When I first started this blog, I was just dipping my toes back into the world of C++. Before that, my experience with it was mostly academic, and after struggling through a course with a particularly poor professor I swore off it in favor of VB.NET. No, I never did forgive myself for that decision, but it ultimately helped me learn to appreciate the importance and relevance of C++. And after tinkering with systems that use C++ exclusively, I’ve come to appreciate it even more.