Not enough memory, any choices besides a Mega?

#include "LedMatrixObject.h"
#include "TimerObject.h"

LedMatrixObject *led = new LedMatrixObject(2, 3, 4, 5, 6, 7, 8, 9);
TimerObject *timer1 = new TimerObject(3000);

int introCount = 0;

unsigned char _To[16][16] = {
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
};
unsigned char _Mein[16][16] = {
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1,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 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
};

void setup(){
  timer1->setOnTimer(&countTimer);
  timer1->Start();
}
void countTimer() {
  introCount += 1;
  if (introCount == 11){
    introCount = 1;
  }
}
void loop(){

  timer1->Update();

  if(introCount == 10){
    led->setScene(_F);
  }
  if(introCount == 9){
    led->setScene(_And);
  }
  if(introCount == 8){
    led->setScene(_A);
  }
  if(introCount == 7){
    led->setScene(_U);
  }
  if(introCount == 6){
    led->setScene(_Heart);
  }
  if(introCount == 5){
    led->setScene(_I);
  }
  if(introCount == 4){
    led->setScene(_I);
  }
  if(introCount == 3){
    led->setScene(_Engle);
  }
    if(introCount == 2){
    led->setScene(_Mein);
  }
  if(introCount == 1){
    led->setScene(_To);
  }
  led->draw();
}

I couldn't type a message due to the 9000 character cap so..

I have it working with each scene individually but when trying all in all I exceed the memory... anything I can do besides going to a Mega? Maybe someone knows a more efficient way to setup the scenes?

Yes.

Pack the bits of you tables in unsigned int xArr[16]. ( reduces the size of the arrays by 8 ).

Place the tables in PROGMEM. pgmspace doc

Patterns can also be stored in e.g. eeprom (internal or external) or on sd card.

And even some simple data compression might be possible, such as a way to code repeated rows.

But that factor of 8 by bit-packing and the use of PROGMEM will win you a big factor immediately
anyway.

I'm not quite sure how I understand how I can convert that 16x16 pattern into an Array... sorry, anyone care to explain further?

I've always known I needed to learn to use the PROGMEM so guess nows a good time to do that, but thanks so far!

RDaugherty:
I'm not quite sure how I understand how I can convert that 16x16 pattern into an Array... sorry, anyone care to explain further?

unsigned char _To[16][16] = {
  {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
unsigned char _To[16][2] = {
  {0xff, 0xff},

To tag along on AWOL's comment, 0xff in binary is 11111111, so setting two char's to that value would yield:

1111111111111111

You could also use an unsigned int and use 0xffff to get the same value.

See where AWOL is going with this? Now you're using 2 bytes where you used to use 16 bytes. Think about it. If you need the pattern:

1111101111111111

Use a binary to hex converter to get 0xfbff and so on for the values you need.