@Override
	public synchronized void serialEvent(SerialPortEvent oEvent)
	{
		if (oEvent.getEventType() == SerialPortEvent.DATA_AVAILABLE) {
			try {
				if (input.ready()) {
					String inputLine = input.readLine();
					this.state.parseInput(inputLine);
					for (ArduinoDataEventListener listener : this.listeners) {
						if (listener != null) {
							listener.dataReady(state);
						}
					}
				}
			} catch (IOException ex) {
				Logger.getLogger(ArduinoController.class.getName()).log(Level.SEVERE, null, ex);
			}
		}
	}