Added writing to serial port