while(0);
Why? Since 0 is not true, this does nothing.
while(0 == PSKey);
I don't know where PSKey is defined, or what it's value is, but if it is 0, this is an infinite loop with no way to exit. Why?
const int groundpin = 66; // analog input pin 4 -- ground
const int powerpin = 67; // analog input pin 5 -- voltage
const int xpin = A11; // x-axis of the accelerometer
const int ypin = A10; // y-axis od the accelerometer
const int reset = 54;
The mix of aliases and real pin numbers is confusing. Use a consistent numbering scheme.
What does Record() do? I would expect that that is where you would set the reset pin HIGH for a period of time, then LOW.
The shield has LEDs that indicate it's status. Do the LEDs change color/state when you run that code?