Capture accelerometer samples and save to MongoDB.