Are you compiling with 1.5.x so you know your free-memory? If not, you may want to use the freeMem() utility:
// Private function: from http://arduino.cc/playground/Code/AvailableMemory
int freeRam () {
extern int __heap_start, *__brkval;
int v;
return (int) &v - (__brkval == 0 ? (int) &__heap_start : (int) __brkval);
}
I went back on my notebook and looked at the tinyGPS library and the example:
while (ss.available())
{
char c = ss.read();
// Serial.write(c); // uncomment this line if you want to see the GPS data flowing
if (gps.encode(c)) // Did a new valid sentence come in?
newData = true;
}
So, perhaps you want to pass the char to the gps.encode() rather than the function.
Ray