Hello, i am doing my first project using arduino, i have a problem that is showing the text from a file in a SD card to a (16,2) lcd screen that is called time.dat , the file only has a single line that is
Date: 2019-04-26, Time: 21:30:00 however i want to make to make the text after the comma go to the second line using the setCursor command, but i am having trouble splting the string, i tried using readStringUntil but that only gives me the first part of the text and i tried using strtok like i did in C however i am having troubles using it. My teacher told me i should use subStrings but i can't really undrestand how to read and print a subString. Help would be really appreciated and sorry for my bad english.
demkat1:
A Brattain Member [PaulS] calls a forum member : fool!!!
Not to condone PaulS' (lack of) manners, on the contrary I despise them, guess what?- the reality is you won't change anything by bleating and he (un-)fortunately happens to be one of the most knowledgeable and helpful folk on this forum (once you cut through his brusqueness and read what he's really saying).
(I never thought I'd say that.... I'm mellowing with age, evidently.)
Mastering strtok() is well-worth the effort. I suggest a DuckDuckGo search on "Arduino C strtok() example" and experiment with some of those. Keep in mind that strtok() is "destructive", which means if you wish to re-use the input string, make a copy of it before you use strtok(), as it divides up the input char array with NULL characters.