Need help performing multiple calculations with variables.

bump. Anyone have any ideas for what might be causing the arduino to freeze, or have optimization suggestions?

All I can suggest is narrowing things down.

You could output debugging to another Arduino:

You could plugin in the serial monitor and see where the delays/hangs are.

#include <SD.h>

I believe SdFat has published a replacement that is considerably faster. If you cannot find the relevant post, bump this topic and I'll see if I can find it.

Thanks, I found the SDfat library. I am looking through the quickstart and everything seems way over my head compared to the standard SD.h library....