 
 class BTDeviceManager : NSObject, CBCentralManagerDelegate, CBPeripheralDelegate {
 
+    // heart rate monitor service uuid
+    let heartRateServiceUUID = CBUUID(string: "180D")
+    // heart rate measurement characteristic
+    let heartRateMeasurementCharacteristic = CBUUID(string: "2A37")
+    // sensor location characteristic
+    let sensorLocationCharacteristic = CBUUID(string: "2A38")
+    // heart rate control point characteristic
+    let heartRateControlPointCharacteristic = CBUUID(string: "2A39")
+    // device id key
+    let deviceIdKey = "MyDevice"
     // track whether bluetooth is currenty on
     var blueToothOn : Bool = false
     // current BT state

        // create the serial queue for the central manager to use
        centralManagerQueue = DispatchQueue(label: centralManagerQueueName, attributes: [])
        super.init()
         // create the central manager with us as the delegate
        centralManager = CBCentralManager(delegate: self, queue: centralManagerQueue)
    }
    

        let deviceUUIDString = NSString(string: deviceId.uuidString)
        print("deviceUUIDString = \(deviceUUIDString)")
        let userDefaults = UserDefaults.standard
        userDefaults.set(deviceUUIDString, forKey: "MyDevice")
        userDefaults.synchronize()
        peripheral.delegate = self;
        let serviceUUIDs = [heartRateServiceUUID]
        peripheral.discoverServices(serviceUUIDs)
    }
    
