Using SD card to store variables.
hey guys. first post arduino forums
i'm doing project school. we've built custom "arduino-style" board using atmega 328p-pu, 3.3v 8mhz logic. we're treating arduino pro or pro mini. our code getting kindof big. there's lot can still reduce ram usage, optimize our code, etc.. however, i'm afraid still might run out of flash , ram memory before reaching our goal project.
part of design browse sd card , allow user read/write data it. had idea might able have arduino find unused memory on sd card , use store variables, (including sdfile variables,) , misc. temporary data while worked, clean after on exit. possible?
also, if possible, we'd stick sd.h , sdfat.h libraries come arduino software, without downloading new versions of sdfat.h library.
thanks in advance help!
~boxcartenant
i'm doing project school. we've built custom "arduino-style" board using atmega 328p-pu, 3.3v 8mhz logic. we're treating arduino pro or pro mini. our code getting kindof big. there's lot can still reduce ram usage, optimize our code, etc.. however, i'm afraid still might run out of flash , ram memory before reaching our goal project.
part of design browse sd card , allow user read/write data it. had idea might able have arduino find unused memory on sd card , use store variables, (including sdfile variables,) , misc. temporary data while worked, clean after on exit. possible?
also, if possible, we'd stick sd.h , sdfat.h libraries come arduino software, without downloading new versions of sdfat.h library.
thanks in advance help!
~boxcartenant
from lack of quick response can sure want (treat part of sd card ram) can't done.
remember if using "print()" , "println()" string constants can save lot of ram using f() macro keep string constant in flash: serial.print(f("string constant"));
you can save memory space re-reading sd card instead of keeping data in memory. don't try make list of files, search sd card each time want know files there.
if have large data arrays may able calculate contents of array on fly instead.
if run out of ideas, publish code , maybe 1 of many experts here can suggest more savings. if can implement three-axis cnc controller in arduino uno (see: https://github.com/grbl/grbl) can implement quite large system on one.
remember if using "print()" , "println()" string constants can save lot of ram using f() macro keep string constant in flash: serial.print(f("string constant"));
you can save memory space re-reading sd card instead of keeping data in memory. don't try make list of files, search sd card each time want know files there.
if have large data arrays may able calculate contents of array on fly instead.
if run out of ideas, publish code , maybe 1 of many experts here can suggest more savings. if can implement three-axis cnc controller in arduino uno (see: https://github.com/grbl/grbl) can implement quite large system on one.
Arduino Forum > Using Arduino > Storage > Using SD card to store variables.
arduino
Comments
Post a Comment