trim data from serial communicator, clear measured data after writing it