 void pollButton() {
   // check the button
   int tempButtonState = digitalRead(BUTTON_PIN);
-  
+
   if (tempButtonState != buttonState) {
     buttonState = tempButtonState;
-    
+
     if (buttonState == LOW) {
       Serial.println(F("Mute"));
       bleMultimedia.write(MMKEY_MUTE);


  if (buttonState == LOW) {
    Serial.println(F("BLE HID Peripheral - clearing bond data"));
    
    // clear bond store data
    bleHIDPeripheral.clearBondStoreData();
  }
  
  encoder.write(0);
  
#ifdef ANDROID_CENTRAL
  bleHIDPeripheral.setReportIdOffset(1);
#endif
  
  bleHIDPeripheral.setLocalName("HID Volume");
  bleHIDPeripheral.addHID(bleMultimedia);


void pollEncoder() {
  // check the encoder
  int encoderState = encoder.read();

  if (encoderState != 0) {
    if (encoderState > 0) {
      Serial.println(F("Volume up"));
      bleMultimedia.write(MMKEY_VOL_UP);
    } else {
      Serial.println(F("Volume down"));
      bleMultimedia.write(MMKEY_VOL_DOWN);
    }

    encoder.write(0);
  }
}

