Read Csv and assign Varriable

am struggeling to read a .csv file and assign them to different variables.
I’m logging different sensors from a Weatherstation.
In purpose of displaying them in a graph, I have to read a previously saved csv.
Each line consists of seven values as shown beneath:

0,3,10-02-2022,00:01,33
1,0,10-02-2022,00:02,7

DataType: byte,byte,char[8],char[8],short
Variable: motor, path, date, time speed
Delimitor: ','

Could someone be so kind to shed me some light on this?

Well, we can hardly help clean up your mess without knowing what it is. Please post your best attempt, in code tags. Then we can move from vague generalities to specific details.

Use https://www.arduino.cc/reference/en/language/functions/communication/serial/readbytesuntil/ to read one line. I know that it's under Serial, but will work for files as well.

After that, you can parse with e.g. https://linux.die.net/man/3/strtok.

  1. Robin's Serial Input Basics - updated has an example; you can work directly on the buffer where you store the line, you don't need to make a copy.
  2. Other example: C library - strtok() function
byte motor = file.parseInt();

byte path = file.parseInt();

char dateBuffer[15];
int lenDate = readBytesUntil(',', dateBuffer, 14);
dateBuffer[lenDate] = '\0';

char timeBuffer[15];
int lenTime = readBytesUntil(',', timeBuffer, 14);
timeBuffer[lenTime] = '\0';

short int speed = file.parseInt();