Hi everyone,
I'm a student who is totally new to the RepRap world. I would like to learn more about the 3d printing world.
For learning purpose, I'm trying to write an arduino program that makes the printing process autonomous with a LCD screen and SD card. Right now, I'm at the state of display and open the file names on the LCD, and need some guidance and help.
What I have achieved so far is to get the LCD displayed the name of the file in the SD card in a 8.3 short name format. But failed to open the files which is not in the root directories, because I wasn't able to get the path of the file. what I did was modifying the SDFile.ls() and SDFile.printDirName() function such that they jam all the file name into one single string. The file names is then extracted from this string (based on the pattern of the string) and stored into an array.
The result looks like this:
//Output from calling SDFile.ls():
AATXT~1.TXT
AA2TXT~1.TXT
A1/
ANOTHE~1.TXT
SS1.TXT
AA3.TXT
AA4GCO~1.TXT
//Those name is store into this string,( the pattern made it hard to extract the path name for each file, I think)
00AATXT~1.TXT0AA2TXT~1.TXT0A1/00ANOTHE~1.TXT0SS1.TXT0AA3.TXT0AA4GCO~1.TXT
//The string is then store into this array
AATXT~1.TXT
AA2TXT~1.TXT
A1/ANOTHE~1.TXT
SS1.TXT //***this file doesn't has a path
AA3.TXT
AA4GCO~1.TXT
I have looked into Marlin's firmware for the LCD and SD support of the printer. But it is far beyond my knowledge to understand it. Maybe what I did is fundamentally wrong, so I would greatly appreciate any (minimal) guidane and help, even just some direction toward any documentation.
Thank you very much,
EricD