I am making a tide & sunrise/sunset display screen and I am having trouble working out how to read from a .csv file / specific line.
I have the following example data (which is in an excel sheet and can be manipulated to facilitate this code):
day, highwater, lowater, sunrise, sunset,
1, 0750, 1130, 0600, 1700, 2, 0830, 1210, 0610, 1710, 3, 0910, 1245, 0612, 1715, 4, 0630, 1920, 0530, 1940,
I am struggling to work out how to include this in my Arduino MEGA 2560 program. I have a clock that states the days and I would like the arduino when, for example, it is day 3 to look up the third row and take the comma separated values split them into 4 values which can then be referred to in the main code to display them to the LCD. I should be ok phrasing the array once the correct line has been selected but unsure how to just go to a specific line..if this is even possible.
Any help or thoughts will be much appreciated. Thanks!