 #define CNT_MAX 2000
 
 // number of samples used to calibrate min and max
-#define CALIBRATION_SAMPLES 50
+#define CALIBRATION_SAMPLES 30
 
 // size of diff histo for calibration
 #define CALIBRATION_HISTO_SIZE 10

int cnt, val_min, val_max, diff;

// global vars for accumulated noise measures
int acc_max, acc_sum, acc_cnt, samples_cnt;
long acc_start;

// global vars for calibration

    Serial.print(val_min);
    Serial.print(" max ");
    Serial.print(val_max);
    Serial.print(" diff_min ");
    Serial.print(diff_min);
    Serial.print(") cnt=");
    Serial.print(cnt);
    Serial.print(" time=");
