 void handleCommands() {
 }
 
-void analyseData() {
-
+void analyseData(int sensorValue) {
+	if(sensorValue > 800 | sensorValue < 0) {
+		Serial.println("Critical value detected, increasing transmission frequency");
+		buffer_limit = 10;
+		sleep_time = 200;
+	}
 }
 
 void sendData() {

		        		break;	
		        	case PIPE_CONNECTIONCONTROL_SAMPLINGRATE_RX_ACK_AUTO:
		        		Serial.println(F("SAMPLING_RATE: "));
		        		printData(aci_evt);
						
						// 4 Bytes
 						// big-endian !!!!



boolean isBufferFull() {
	return buffer_size() > buffer_limit;
}

boolean checkTransmissionCriteria() {
