         {
             turnOnLED(RED);
         }
-        delay(500);
+        //delay(500);
         turnOffLEDS();
-    }
+    
     if (clapMeterOn == true && sensorValue < 50)
     {
         average = clapMeter/counter;
         clapMeterOn = false;
-        Serial.println("HA SALIDO ===============> ");
-        Serial.println(average);
+        //Serial.println("HA SALIDO ===============> ");
+        //Serial.println(average);
         lcd_blink(average);
         counter = 0;
         clapMeter = 0;
-        delay(1000);
+        //delay(1000);
     }
+    }
+
 }
 
 void pins_init()

int sensor_2 = 0;
SoftwareSerial lcd(99, LCD_OUT);

void setup()
{
    Serial.begin(9600);
    pins_init();

    pinMode(LCD_OUT, OUTPUT);
    lcd.begin(9600);

    lcd_init();

}

void loop()
{

    sensor = analogRead(SOUND_SENSOR);
    sensor_2 = analogRead(SOUND_SENSOR_2);
    if(min(sensor,sensor_2) > 0)
    {
        sensorValue = max(sensor, sensor_2);
        Serial.print("sensorValue ");
        Serial.println(sensorValue);
        if(sensorValue > THRESHOLD_GREEN)
        {
            turnOnLED(GREEN);

            if(counter==0){
                Serial.println("********************* INICIO APLAUSOMETRO");
            }
            clapMeterOn = true;
            clapMeter = clapMeter + sensorValue;

{
    for(int i=0; i<=10; i++){
        lcd_init();
        //delay(200);
        lcd.print(value);
        //delay(200);
    }
}

void hc138sacn(byte r){
  digitalWrite(RowA,(r & 0x01));
  digitalWrite(RowB,(r & 0x02));
  digitalWrite(RowC,(r & 0x04));
  digitalWrite(RowD,(r & 0x08));

}


