My problem is that I have a SAM4E-EK chip from ATMEL and my goal is to great a text file and upload it to a sd card and then read from the sd card.
I have manage to open the file read the contents of the file and then print it on the LCD, but what I really want is to read every line separately and print it on different locataion on my LCD.
Or perhaps more challenging will be to read specific sting for and example:
Hello, what to you thing about the elections in America?
Who do you think will be the next president of USA?
Imagining the above written text is in my sd text file and the string that I want to get and display are the underline ones.
Currently I'm using a FatFs library. My code:
/*Register the system object in logical drive*/
memset(&fs, 0, sizeof(FATFS));
/*Open or Create a file on the drive*/
res = f_open(&file_object, "ReadThis.txt",FA_OPEN_ALWAYS | FA_READ);
/*Sometime, open file operation was failed, so try again once*/
if (res) res = f_open(&file_object, "ReadThis.txt",FA_OPEN_ALWAYS | FA_READ);
/*Write header to the log file*/
// TempChar = f_gets(Buff, file_object, 300);
// f_read(&file_object, Buff, 1000, &bw);
ili93xx_draw_string(110, 80, (uint8_t *) Buff1);
ili93xx_draw_string(110, 110, (uint8_t *) Buff1);
So please !! I'll be very great full if you give some hints or perhaps some examples. THANKS!!!