Read CSV or TXT from SD card into string or array

Use a floating type for the variable and use strtod() in place of strtol();

  //  int array[ROW_DIM][COL_DIM];

  //  change array type to float or double (both are 32-bit floating point on AVR)
  double array[ROW_DIM][COL_DIM];

  // ...

  //  array[i][j] = strtol(str, &ptr, 10);

  //  convert filed to floating point instead of long.
      array[i][j] = strtod(str, &ptr);