 #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 6
+#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;

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;

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

}

void pins_init()
