       checkSoundState(pin, soundValues[pin]);
       
       // send sound level (if required):
-      sendSoundLevel(pin, soundValues[pin]);
+      if(pin == 0)
+        sendSoundLevel(pin, soundValues[pin]);
     }
   }
   

}

void checkSoundState(int pin, int level){
  if(pin != 0 && pin != 5) return; //only check pin 0 for now
    
  if( currentState[pin] == 0 ) {
    // IF SILENCE

  if(debug) Serial.println(state);
  
  // always start with 3 bytes of 255 so that Node.js knows were this 'packet' starts:
  NodeSerial.write((byte)255);
  NodeSerial.write((byte)255);
  NodeSerial.write((byte)255);
  NodeSerial.write((byte)02); // 02 = soundstate
  NodeSerial.write((byte)pin); // channel
  NodeSerial.write((byte)state); // volumeon
  NodeSerial.write((byte)0); // empty byte, because we always expect 4 bytes ;-)
}



void sendSoundLevel(int pin, int level){  
  uint16_t number = level;
  uint16_t mask   = B11111111;
  uint8_t first_half   = number >> 8;
  uint8_t sencond_half = number & mask;
  
  // always start with 3 bytes of 255 so that Node.js knows were this 'packet' starts:
  NodeSerial.write((byte)255);
  NodeSerial.write((byte)255);
  NodeSerial.write((byte)255);
  NodeSerial.write((byte)03); // 03 = soundlevel
  NodeSerial.write((byte)pin);  // channel
  NodeSerial.write((byte)first_half);   // value, first byte (Big Endian)
  NodeSerial.write((byte)sencond_half); // value, last byte  (Big Endian)
}


