     var peripheral: CBPeripheral?
     private var characteristicArray = [CBCharacteristic]()
     
-    private var ledPattern = [ledButtonTag.Red,    ledButtonTag.Off,
-                              ledButtonTag.Yellow, ledButtonTag.Off,
-                              ledButtonTag.Green,  ledButtonTag.Off,
-                              ledButtonTag.Cyan,   ledButtonTag.Off,
-                              ledButtonTag.Blue,   ledButtonTag.Off,
-                              ledButtonTag.Purple, ledButtonTag.Off]
+    private var ledPatternList = [ledPattern.Red,    ledPattern.Off,
+                                  ledPattern.Yellow, ledPattern.Off,
+                                  ledPattern.Green,  ledPattern.Off,
+                                  ledPattern.Cyan,   ledPattern.Off,
+                                  ledPattern.Blue,   ledPattern.Off,
+                                  ledPattern.Purple, ledPattern.Off]
     
     private var ledPatternIndex = 0
     
-    private enum ledButtonTag: Int {
+    private enum ledPattern: Int {
         case Red, Yellow, Green, Cyan, Blue, Purple, Off
         
         private var type: NSData {


    func stop() {
        if peripheral?.state == CBPeripheralState.Connected {
            peripheral?.writeValue(ledButtonTag.Off.type, forCharacteristic: characteristicArray[4], type: .WithResponse)
            ledPatternIndex = 0
        }
    }

    
    func play() {
        if peripheral?.state == CBPeripheralState.Connected {
            peripheral?.writeValue(ledPatternList[ledPatternIndex].type, forCharacteristic: characteristicArray[4], type: .WithResponse)
            ledPatternIndex++
            if ledPatternIndex >= ledPatternList.count {
                ledPatternIndex = 0
            }
        }
