Added recording of data

Both incoming sensor data and outgoing command data are captured and stored in respective MongoDB collections.