public void serialEvent(SerialPortEvent spe) {

		if (spe.getEventType() == SerialPortEvent.DATA_AVAILABLE) {//If one byte of data came in
			while (!sendingData) {
				try {
					if (sendingData) {
						break;
					}
					byte charVal = (byte) input.read();

					if (charVal != -1 && (System.currentTimeMillis() - startTime) > 100 ) { //To avoid "listening(saving)" to own's message.
						if (main.gui.isExpOneSelected()) {
							rxExperOne(charVal);
						} 
						else if (main.gui.isExpTwoSelected()) {
							rxExperTwo(charVal);
						} else if (main.gui.isExpThreeSelected()) {
							rxExperThree(charVal);
						}

						/*String str = new String(new byte[] { (byte) charVal });
						if (charVal == '!') { //byteCounter > 36
							window.textInputArea.append("\n");
							System.out.print("\n");
							refreshBERValue();
							byteCounter = 0;
						} else if (charVal == '>') {
							window.textInputArea.append(">");
							byteCounter = 0;
							window.textMsgArea.append("ACK Msg from Bot_B Rxd!\n");
						} else {
							netText[byteCounter++] = charVal;
							window.textInputArea.append(str);
							//System.out.print(new String(netText));
						}*/
					}

				} catch (Exception e) {
					logText = "Failed to read data." + "(" + e.toString() + ")";
					main.gui.textInputArea.setForeground(Color.red);
					main.gui.textInputArea.append(logText + "\n");
					System.err.println(e.toString());
				}
			}
		}
	}