Servo control

@remiss
Yes, it is. Using NULL as the first argument tells strtok() to keep parsing the same string. Your modification will have strtok() start parsing the original string again, which will result in an endless loop.

On a side note, why can't I use 'i < sizeof(vals)' ? When I try that, I get a different output:

vals is an array of ints. There are 5 ints in the array, so that is a total of 10 bytes, so sizeof(vals) returns 10.

sizeof(vals)/sizeof(vals[0]) would return the number of elements in the array.

As to your overall problem, there could be an issue with the reading of the file, or there could be an issue with the parsing. Add:

Serial.print("String to parse: [");
Serial.print(buffer);
Serial.println("]");

to the top of parseBuffer(). This will isolate the error to either the reading or the parsing.