     Serial.println(central.address());
 
     while (bleHIDPeripheral.connected()) {
-      pollButton();
-
-      pollEncoder();
+      pollInputs();
     }
 
     // central disconnected
     Serial.print(F("Disconnected from central: "));
     Serial.println(central.address());
+  }
+}
+
+void pollInputs() {
+  // only poll the input every 100ms
+  if (millis() - lastInputPollTime > INPUT_POLL_INTERVAL) {
+    pollButton();
+
+    pollEncoder();
+
+    lastInputPollTime = millis();
   }
 }
 

    encoder.write(0);
  }
}


Encoder encoder(ENC_RIGHT_PIN, ENC_LEFT_PIN);

int buttonState;
unsigned long lastInputPollTime = 0;

void setup() {
  Serial.begin(115200);
