Read data from serial port and generate graphic