         }
         */
 
-        if(sensorValue > THRESHOLD_FAIL)
-        {
-            clapMeterOn = true;
-            clapMeter = clapMeter + sensorValue;
-            counter++;
-        }
-   }
-   if (clapMeterOn == true && sensorValue < 50)
-   {
-        average = clapMeter/counter;
-        Serial.println("FIN DEL CONTEO");
-        Serial.println(average);
-        clapMeterOn = false;
-        //show_results
-
-        counter = 0;
-        clapMeter = 0;
-    }
-
-    scanning = false;
-
-}
 
 void lcd_init()
 {

}

int scanClaps(){
    sensor = analogRead(SOUND_SENSOR);
    sensor_2 = analogRead(SOUND_SENSOR_2);

    if(min(sensor,sensor_2) > 0)
    {
        sensorValue = max(sensor, sensor_2);
        /*
        setHistogram(sensorValue);



void loop()
{
    if(scanning){
        result = scanClaps();
    }else{
        showResult();
    }
