The question is, how fast do you need the data. I can read in 144 bytes in just about 120usecs. How much data are you reading and how fast do you need the whole shebang?
I can’t even get to the reading part. the sram fills up due to SD.begin(), and bam, arduino is locked up because FastLED + LCD Keypad + SD libs = not enough working memory for the stack/heap. There’s no real alternative, sadly. Either I axe the SD card plan, or I get an arduino mega.
Hrm, seems odd that it fails when you start .begin(). But then, I don’t use the standard SD library. See what SdFat does for you …
Got a proper download link to that? All I find is the Adafruit version, which doesn’t seem right.
Thanks. On a quick test, it cut ram usage down by about 250b, so everything runs now. Now I have to figure out how to actually get things to output to the LCD.
Sometimes, pushing strings into PROGMEM instead of storing them in SRAM will also help cut down on usage.
Right. At the moment, there aren’t any strings stored. So do you have a bmp reading function you can share? I’m looking at the one in the Adafruit TFT library, and I’m thinking it’s waaay overkill.
It was done for testing only, and modified for my POV string of 48 pixels. It is adapted from a similar setup that Adafruit has (though theirs didn’t work out of the box.)
http://pastebin.com/vwqzZVrd
Relatively easy once you parse the DIB header (prior to the DIB data) to get the image offset. Once you have that, seek to that position and start reading.
Did that help you at all @Noel_Bundy ?