Added function to open serial port, rather than opening automatically