 SoftwareSerial lcd(99, LCD_OUT);
 
 
-#define DBNORM 70
+#define DBNORM 140
 
 void setHistogram(int value){
 
      int normValue = value/DBNORM;
      normValue = min(normValue*2,32);
+     if (normValue == 0){
+      hz = zero; 
+     }
+     else if (normValue == 1){
+      hz = one; 
+     }
+     else if (normValue == 2){
+      hz = two; 
+     }
+     else if (normValue == 3){
+      hz = three; 
+     }
+     else if (normValue == 4){
+      hz = four; 
+     }
+     else if (normValue == 5){
+      hz = five; 
+     }
+     else if (normValue == 6){
+      hz = six; 
+     }
+     else if (normValue == 7){
+      hz = seven; 
+     }
+     else if (normValue == 8){
+      hz = eight; 
+     }
+     else if (normValue == 9){
+      hz = nine; 
+     }
+     else if (normValue == 10){
+      hz = ten; 
+     }
+     else if (normValue == 11){
+      hz = eleven; 
+     }
+     else if (normValue == 12){
+      hz = twelve; 
+     }
+     else if (normValue == 13){
+      hz = thirteen; 
+     }
+     else if (normValue == 14){
+      hz = fourteen; 
+     }
+     else if (normValue == 15){
+      hz = fifteen; 
+     }
+     else if (normValue == 16){
+      hz = sixteen; 
+     }
+     else {
+      hz = sixteen; 
+     }
+
+
+
      //Serial.println(hz.size);
      
-     for (int i=0;i<64;i++){
-         hz1[i] = 0x00; 
-     }
-     
+ 
+/**     
      for (int i=0;i<64;i++){
      	 if (i<normValue){
-     	     hz1[i] = 0xFF;
+     	     hz1[i] = ~0xFF;
      }
          else if(i>32 && i<normValue+32){
-     	     hz1[i] = 0xFF;
+     	     hz1[i] = ~0xFF;
      	 }
          else{
-             hz1[i] = 0x00;
+             hz1[i] = ~0x00;
          }
+
 	 }
-     
-
-     for (int i=0;i<64;i++){
-      Serial.print(hz1[i],HEX); 
-     }
+  */   
+
+
 }
 void setup()
 {


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,

void loop()
{
    
    sensor = analogRead(SOUND_SENSOR);
    sensor_2 = analogRead(SOUND_SENSOR_2);

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