I am working on a project that I need to read 84 characters from an SD card, I then display the text on an OLED screen (4 lines of 21 characters) after a delay the screen clears and displays the time for a set period. This process repeats with a second set of 84 characters being read off the SD card then displayed. This whole process repeats until there is no more character available to read off the SD card then the whole process repeats.
I have temporally overcome this by putting the characters in an array using this method
char *screentext[ ] = { "some text 21 chrs line 2 text is here line 3 text is here line 4 text is here ", "screen 2 text line 1 line 2 text is here line 3 text is here line 4 text is here "};
This may be crude but works but I am limited to only 12 screens of three lines of 21 characters. If I make this array any larger the RTC is no longer seen and gives errors. I have tried to read the SD card with each screen of text being a separate file. I can open the file, read the file but am unable to print the contents of the file to the screen. The screen is an I2C Oled and I write to it with
display.print(screentext[n]);
display.display();
where 'n' is the number of the text in the array, ie screen number.
Hope you can understand what I am trying to do, thanks