Collect accelerometer data and save to mongodb.