prevSensorValue = analogRead(pingPin);
int currSensorValue = analogRead(pingPin);
if((abs(currSensorValue - prevSensorValue)) > bigChange)
No! currSensorValue is for this pass through loop. prevSensorValue is from last time, NOT this time.
int currSensorValue = analogRead(pingPin);
if((abs(currSensorValue - prevSensorValue)) > bigChange)
{
// a change occurred
then = millis();
digitalWrite(led13, HIGH);
// Do something with the sensor data
}
prevSensorValue = currSensorValue;