Welcome! Log In Create A New Profile

Advanced

Need help for SD and LCD interfacing!!

Posted by EricD 
Need help for SD and LCD interfacing!!
June 07, 2012 03:29PM
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
Re: Need help for SD and LCD interfacing!!
June 08, 2012 07:33AM
Quote

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.

Looks like you have to learn it.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Need help for SD and LCD interfacing!!
June 08, 2012 02:15PM
Hi Traumflug,

Thanks for your reply. I totally agree with you that I'm still in the learning process. Can you give me some direction like where should I start. Do you have any suggestion for reading material related to the topic?

Eric
Sorry, only registered users may post in this forum.

Click here to login