     public func writeMatrix(matrix: NuimoLEDMatrix, interval: NSTimeInterval, options: Int) {
         matrixWriter?.writeMatrix(matrix, interval: interval, options: options)
     }
-}
+
+    private func writeHeartBeatInterval() {
+        guard peripheral.state == .Connected else { return }
+        guard let service = peripheral.services?.filter({ $0.UUID == kSensorServiceUUID }).first else { return }
+        guard let characteristic = service.characteristics?.filter({ $0.UUID == kHeartBeatCharacteristicUUID }).first else { return }
+        let interval = UInt8(max(0, min(255, heartBeatInterval)))
+        peripheral.writeValue(NSData(bytes: [interval], length: 1), forCharacteristic: characteristic, type: .WithResponse)
+    }
+}
+
+public let NuimoBluetoothControllerDidSendHeartBeatNotification = "NuimoBluetoothControllerDidSendHeartBeatNotification"
 
 extension NuimoBluetoothController /* CBPeripheralDelegate */ {
     public override func peripheral(peripheral: CBPeripheral, didDiscoverCharacteristicsForService service: CBService, error: NSError?) {

            }
        case kBatteryCharacteristicUUID:
            delegate?.nuimoController?(self, didUpdateBatteryLevel: Int(UnsafePointer<UInt8>(data.bytes).memory))
        default:
            if let event = characteristic.nuimoGestureEvent() {
                delegate?.nuimoController?(self, didReceiveGestureEvent: event)

    public override var charactericUUIDsForServiceUUID: [CBUUID : [CBUUID]] { get { return nuimoCharactericUUIDsForServiceUUID } }
    public override var notificationCharacteristicUUIDs: [CBUUID] { get { return nuimoNotificationCharacteristicnUUIDs } }

    public var heartBeatInterval: NSTimeInterval = 0.0 { didSet { writeHeartBeatInterval() } }

    private var matrixWriter: LEDMatrixWriter?
    private var connectTimeoutTimer: NSTimer?

