Reading a .csv file element wise
The read() method works character-wise, not element-wise. Then you
have to rethink your algorithm to loop over characters:


store each character in a buffer
send the whole buffer (i.e. a single element) when you see a delimiter


Example:

const size_t BUFFER_SZ = ...;
char buffer[BUFFER_SZ];
size_t pos = 0;    // current write position in buffer
int c;

// While we can read a character:
while ((c = &lt;file&gt;.read()) != -1) {

    // If we get a delimiter, then we have a complete element.
    if (c == ',' || c == '\n') {
        buffer[pos] = '\0';         // terminate the string
        raspberry.println(buffer);  // send to the RPi
        pos = 0;                    // ready for next element
    }

    // Otherwise, store the character in the buffer.
    else if (pos &lt; BUFFER_SZ-1) {
        buffer[pos++] = c;
    }
}


Here the buffer is sent as a string. If you want to parse it into a
number, you can use sscanf.

This code assumes Unix text-file conventions, i.e. each line of the file
(including the last one) being terminated by an LF character. You may
have to adapt if your file is different.