         matrixBytes[10] = matrixBytes[10] +
             (currentWithFadeTransition              ? UInt8(1 << 4) : 0) +
             (currentMatrix is NuimoBuiltInLEDMatrix ? UInt8(1 << 5) : 0)
-        matrixBytes += [UInt8(min(max(brightness, 0.0), 1.0) * 255), UInt8(currentDisplayInterval * 10.0)]
+        matrixBytes += [UInt8(min(max(controller.matrixBrightness, 0.0), 1.0) * 255), UInt8(currentDisplayInterval * 10.0)]
         peripheral.writeValue(Data(bytes: UnsafePointer<UInt8>(matrixBytes), count: matrixBytes.count), for: matrixCharacteristic, type: withWriteResponse ? .withResponse : .withoutResponse)
 
         isWaitingForWriteResponse        = withWriteResponse

//MARK: - LED matrix writing

private class LEDMatrixWriter {
    unowned let peripheral: CBPeripheral
    unowned let matrixCharacteristic: CBCharacteristic
    unowned let queue: DispatchQueue
    var brightness: Float

    private var currentMatrix: NuimoLEDMatrix?
    private var currentDisplayInterval: TimeInterval = 0.0

            case kFirmwareVersionCharacteristicUUID: fallthrough
            case kModelNumberCharacteristicUUID:     fallthrough
            case kBatteryCharacteristicUUID:         peripheral.readValue(for: characteristic)
            case kLEDMatrixCharacteristicUUID:       matrixWriter.matrixCharacteristic = characteristic
            case kHeartBeatCharacteristicUUID:       writeHeartBeatInterval()
            default:
                break
