Made output and reading from com port.