MicroSD Cards and Arduino
For at least some of my LED sign Arduino projects Iβm thinking of building, Iβm thinking of adding a MicroSD card module, that lets you store large amounts of data. Iβm concerned with some of the more complicated LED signs,π€ especially those with animated pictures or a wide variety of text strings, I may quickly exhaust the 2 KB of SRAM memory that the Arduino Uno and Nano use for storing variables.
MicroSD Arduino shields are cheap, they will set you back about $5 for two of them on eBay. Then you have to find a MicroSD card, the smallest one Iβve seen is about 4 GB (!) for 3 or 4 dollars. I donβt know how you could exhaust that amount of data with a 16 MHz processor, even if you are recording a lot of data non-stop. Well, I guess actually over time, that could happen. But if I were just using it to store per-constructed text strings, like lots of holidays or maybe sunset data, I doubt I could ever use more then a megabyte or two of data. π½MicroSD cards probably are just as fast as any of the built in memory of the Arduino Uno.
That said, I am not sure if I have enough memory to use an SD Card, because the nature of SD cards is they have to read and write 512 bytes at a time, which is quite a bit of space by the time you include the driver.π» It’s probably not worth the extra hardware, just to store some strings.
I think I might just see if I can further optimize my code to save space.π I’m actually not out of space, even for the Nano rather then the Uno which will eventually go in my LED sign.π I can certainly implement more things as a functions, and maybe try to further re-use some of my variables. Who knows how much I can save space-wise though, because compliers often take advantage of space savings.
If the SD card idea and coding efficiency don’t pain out, another possibility is to use something more powerful and memory intensive like a more powerful microcontroller like the Arduino Mega or a microprocessor Raspberry Pi, but both of those options consume more power.π₯ Iβm not really interested in using more expensive, larger, more power hungry components, especially if they are expected to be left running 24-7, as is common with a lot of the projects Iβm building.