DMD library and Bridge.

I am trying to make a DMD sign with a Yun. I have the DMD library working perfectly. I extended the bridge examples to make my own api which works great (tested from the console). When I try to combine the two, as soon as dmd.begin(); is called I lose all communications with the Yun.

I think maybe the problem is with the Yun serial limitations, but I'm not sure. Does anyone here have any ideas?

This is the code that I am trying.

#include <Bridge.h>
#include <YunServer.h>
#include <YunClient.h>
#include <Console.h>

#include <SPI.h>
#include <DMD2.h>
#include <fonts/SystemFont5x7.h>

SoftDMD dmd(3,1);

YunServer server;

void setup() {
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  Bridge.begin();
  digitalWrite(13, HIGH);

  server.listenOnLocalhost();
  server.begin();
  
  while (!Console);
  Console.println("Let's go ...");
  
  dmd.setBrightness(255);
  dmd.selectFont(SystemFont5x7);
  // Whenever this is called bridge no longer seems to work
  dmd.begin();
}

void loop() {
  YunClient client = server.accept();

  if (client) {
    process(client);
    Console.println(" We have client");
    client.stop();
  }

  delay(50);
}

void process(YunClient client) {
  String command = client.readStringUntil('/');

  if (command == "digital") {
    digitalCommand(client);
  }
  if (command == "dmd") {
    dmdCommand(client);
  }
}

void digitalCommand(YunClient client) {
  int pin, value;

  // Read pin number
  pin = client.parseInt();

  // If the next character is a '/' it means we have an URL
  // with a value like: "/digital/13/1"
  if (client.read() == '/') {
    value = client.parseInt();
    digitalWrite(pin, value);
  }
  else {
    value = digitalRead(pin);
  }

  // Send feedback to client
  client.print(F("Pin D"));
  client.print(pin);
  client.print(F(" set to "));
  client.println(value);

  // Update datastore key with the current pin value
  String key = "D";
  key += pin;
  Bridge.put(key, String(value));
}

void dmdCommand(YunClient client) {
  
  String dmdmessage = client.readStringUntil('\n');

  client.print(F("DMD"));
  client.print(F(" set to "));
  client.println(dmdmessage);

  String key = "DMD";
  key += dmdmessage;
  Bridge.put(key, String(dmdmessage));
}