protected boolean connect(){
		LCD.clear();
	    LCD.drawString("Bluetooth:", 0, 0);
	    LCD.drawString("Connect -> Enter", 0, 1);
	    LCD.drawString("Don't -> Esc", 0, 2);
		LCD.refresh();
		
		while(true){
			if ( Button.ENTER.isDown() ){
				while(Button.ENTER.isDown()){try {
					Thread.sleep(1);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}} //wait for button release
				
				LCD.clear();
			    LCD.drawString("Waiting for", 0, 0);
			    LCD.drawString("Bluetooth...", 0, 1);
				LCD.refresh();

		        connection = Bluetooth.waitForConnection(); // this method is very patient.

			    // Get I/O streams from BT connection
			    dataIn = connection.openDataInputStream();
			    dataOut = connection.openDataOutputStream();
			    if(dataIn == null || dataOut == null)
			    {
			    	// Connection failed
					LCD.clear();
				    LCD.drawString("Connection failed", 0, 0);
					LCD.refresh();
					Sound.beepSequence();
					useHMI = false;
					return false;
			    }
			    else
			    {
			    	// Connection successful
					LCD.clear();
					LCD.drawString("Connected",0,0);
					LCD.refresh();	
			    	Sound.beepSequenceUp();
			    	useHMI = true;
			    	return true;
			    }
			}else if ( Button.ESCAPE.isDown() ){
				while(Button.ESCAPE.isDown()){try {
					Thread.sleep(1);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}} //wait for button release
				useHMI = false;
				return false;
			}
		}
		
		
	    
	}