add a delay to test if serial port has input