Some code for monitoring an accelerometer through a collision.