 
 BLEServer* pServer = NULL;
 BLECharacteristic* pCharacteristic = NULL;
+BLEAdvertising *pAdvertising = NULL;
 
 bool connected = false;
 bool pendingValue = false;

//      esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_ADV, ESP_PWR_LVL_N12);
//      esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_SCAN, ESP_PWR_LVL_N12);
//      esp_ble_tx_power_set(ESP_BLE_PWR_TYPE_DEFAULT, ESP_PWR_LVL_N12);
      connected = true;
    };

    void onDisconnect(BLEServer* pServer) {
      Serial.println("Disconnected");
      connected = false;
    }
};



  // Attach interrupt to input pin
  attachInterrupt(INPUT_PIN, onPinChanged, CHANGE);
  
}


