private boolean initialize()
	{
		CommPortIdentifier portID = null;
		Enumeration ports = CommPortIdentifier.getPortIdentifiers();
		System.out.println("Trying ports:");
		while(portID == null && ports.hasMoreElements())
		{
			CommPortIdentifier testPort = (CommPortIdentifier) ports.nextElement();
			System.out.println("  " + testPort.getName());
			if(testPort.getName().startsWith(portName))
			{
				try
				{
					serialPort = (SerialPort) testPort.open(programName, 1000);
					portID = testPort;
					System.out.println("Connected on " + portID.getName());
					break;
				}
				catch(PortInUseException e)
				{
					System.out.println(e);
				}
			}
		}
		
		if(portID == null || serialPort == null)
		{
			System.out.println("Could not connect to Arduino!");
			return false;
		}
		
		try
		{
			serialPort.setSerialPortParams(DATA_RATE, SerialPort.DATABITS_8, SerialPort.STOPBITS_1,
			SerialPort.PARITY_NONE);
			serialPort.addEventListener(this);
			serialPort.notifyOnDataAvailable(true);
			
			Thread.sleep(2000);
			
			return true;
		}
		catch(Exception e)
		{
			System.out.println(e);
		}
		
		return false;
	}