added partial decoding of serial communication to main.cpp

modified from read(...FULL LENGH) to read(...PARTIAL) to read serial data smoothly.
this is different problem, so please create different PR for measure offset