 	lib_aci_init(&aci_state);
 	heart_rate_init();
 	buffer_init();
+	Serial.println(F("----- Setup -----"));
+	Serial.print(F("Connection Interval: "));
+	Serial.println(connection_interval);
+	Serial.print(F("Slave Latency: "));
+	Serial.println(slave_latency);
+	Serial.print(F("Buffer Limit: "));
+	Serial.println(buffer_limit);
+	Serial.print(F("Sleeping Time : "));
+	Serial.println(sleep_time);
+	Serial.println(F("----------------"));
+
 }
 
 void aci_loop()

				break;
	 	    case ACI_EVT_DATA_RECEIVED:
		        Serial.println(F("DATA RECEIVED"));
		        Serial.print(F("Pipe #: 0x"));
		        Serial.println(aci_evt->params.data_received.rx_data.pipe_number, HEX);
		        
				uint16_t value;
		        switch(aci_evt->params.data_received.rx_data.pipe_number) {
		        	case PIPE_CONNECTIONCONTROL_CONNECTIONINTERVAL_RX_ACK_AUTO:
		        		Serial.println(F("CONNECTION_INTERVAL: "));
		        		// printData(aci_evt);

		        		// Two bytes
 						// big-endian !!!!
						value = aci_evt->params.data_received.rx_data.aci_data[1] + ((uint16_t)aci_evt->params.data_received.rx_data.aci_data[0] << 8);
		        		Serial.print(F("Value: "));
		        		Serial.println(value);
		        		break;
		        	case PIPE_CONNECTIONCONTROL_SLAVELATENCY_RX_ACK_AUTO:
		        		Serial.println(F("SLAVELATENCY: "));
		        		// printData(aci_evt);

		        		// One byte
 						// big-endian !!!!
						value = aci_evt->params.data_received.rx_data.aci_data[1];
						Serial.print(F("Value: "));
		        		Serial.println(value);
		        		break;	
		        	case PIPE_CONNECTIONCONTROL_SAMPLINGRATE_RX_ACK_AUTO:
		        		Serial.println(F("SAMPLING_RATE: "));
		        		// printData(aci_evt);
						
						// 4 Bytes
 						// big-endian !!!!
						value = aci_evt->params.data_received.rx_data.aci_data[1] + ((uint16_t)aci_evt->params.data_received.rx_data.aci_data[0] << 8);
		        		Serial.print(F("Value: "));
		        		Serial.println(value);
		        		break;
		        	default:
		        		printData(aci_evt);

	
	if (isChannelOpen())
	{
		handleCommands();
		if(checkTransmissionCriteria()) {
			sendData();
		}
	}
	if(sleep_time < 16383) {
		delayMicroseconds(sleep_time);
	} else {
		delay(sleep_time / 1000);
	}
}

