Code seems to be able to successfuly read from and write to the serial port.