   if (button1.toggled()) {
     if (button1.read() == Button::PRESSED) {
       Serial.println("Button 1 has been pressed");
-      if (isConnected) {
-        sendCC(1);
+      digitalWrite(ledPin, HIGH);
+      if (isConnected) {
+        sendMuteCommand(true);
       }
     } else {
       Serial.println("Button 1 has been released");
-      if (isConnected) {
-        sendCC(0);
+      digitalWrite(ledPin, LOW);
+      if (isConnected) {
+        sendMuteCommand(false);
       }
     }
   }


      battery.update(charge);
    } else {
      cycle_battery += 100;
    }
  }


#include "Adafruit_BLEBattery.h"
#include <Button.h>

#define MINIMUM_FIRMWARE_VERSION    "0.6.6"
#define MODE_LED_BEHAVIOUR          "MODE"

const unsigned int batt_mv_curve[] = {4200, 4030, 3860, 3830, 3790, 3700, 3600};
const unsigned char batt_charge_curve[] = {100, 76, 52, 42, 30, 11, 0};
