         {
             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()

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

#define RED 3
#define THRESHOLD_GREEN 200//The threshold to turn the led on 400.00*5/1024 = 1.95v
#define THRESHOLD_RED 500
#define LCD_OUT 8

#include <SPI.h>

#define RowA 2
#define RowB 3
#define RowC 4
#define RowD 5
#define OE 6
#define R1 11
#define CLK 13
#define STB 10

byte row=0;

byte hz1[] =
{
  //[16*16]
0x00,0x00,
0x00,0x00,
0x00,0x00,
0xFF,0xFF,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
  //[16*16]
0x00,0x00,
0x00,0x00,
0x00,0x00,
0xFF,0xFF,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
0x00,0x00,
};


byte hz2[] =
{
  //[16*16]
0x00,0x00,
0x04,0x80,
0x04,0x80,
0x05,0xFE,
0x09,0x02,
0x0A,0x04,
0x18,0x20,
0x28,0x20,
0x08,0xA8,
0x08,0xA4,
0x09,0x24,
0x09,0x22,
0x0A,0x22,
0x08,0x20,
0x08,0xE0,
0x00,0x00,
  //[16*16]
0x00,0x00,0x10,0x00,0x11,0xF8,0x10,0x08,0x7C,0x10,0x24,0x20,0x24,0x20,0x25,0xFC,
0x44,0x20,0x24,0x20,0x18,0x20,0x08,0x20,0x14,0x20,0x24,0x20,0x40,0xE0,0x00,0x00
};

byte hz[] =
{
  //[16*16]
0x00,0x00,
0x04,0x80,
0x04,0x80,
0x05,0xFE,
0x09,0x02,
0x0A,0x04,
0x18,0x20,
0x28,0x20,
0x08,0xA8,
0x08,0xA4,
0x09,0x24,
0x09,0x22,
0x0A,0x22,
0x08,0x20,
0x08,0xE0,
0x00,0x00,
  //[16*16]
0x00,0x00,0x10,0x00,0x11,0xF8,0x10,0x08,0x7C,0x10,0x24,0x20,0x24,0x20,0x25,0xFC,
0x44,0x20,0x24,0x20,0x18,0x20,0x08,0x20,0x14,0x20,0x24,0x20,0x40,0xE0,0x00,0x00
};


int sensorValue;

int average;
int counter = 0;
boolean clapMeterOn = false;
