Thank you all for that support. 
I'm beginner on this, and Im triying to do something for my kids to encourage them at programming. 
I've modified the code:
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <NinjagoOsBitmaps.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define ALTURA_LOGO 27
#define ANCHO_LOGO 120
#define FRAME_DELAY 100
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
static const unsigned char logo [] PROGMEM = {
0x0f, 0xc0, 0x0f, 0xf8, 0x60, 0x07, 0x1f, 0xf3, 0xff, 0xc3, 0xff, 0xe1, 0xff, 0xff, 0x80, 0x07,
0xe0, 0x0f, 0xf0, 0x70, 0x07, 0x8f, 0xf3, 0xff, 0xc7, 0xff, 0xc3, 0xff, 0xff, 0x00, 0x03, 0xf0,
0x0f, 0xe2, 0x78, 0x07, 0xe7, 0xf3, 0xff, 0xcf, 0xff, 0x87, 0xff, 0xfe, 0x00, 0x01, 0xf8, 0x0f,
0xc6, 0x7c, 0x07, 0xe3, 0xf3, 0xff, 0xcf, 0xff, 0x07, 0xff, 0xfc, 0x00, 0x00, 0x7c, 0x0f, 0x8e,
0x7e, 0x07, 0x81, 0xf3, 0xc3, 0xcf, 0x80, 0x07, 0xc0, 0xf0, 0x00, 0x00, 0x7e, 0x0f, 0x1e, 0x7f,
0x07, 0x81, 0xf3, 0xe3, 0xcf, 0x80, 0x07, 0xc0, 0xf0, 0x00, 0x00, 0x7f, 0x0f, 0x1e, 0x7f, 0x87,
0x81, 0xf3, 0xc3, 0xcf, 0x80, 0x07, 0xc0, 0xf0, 0x00, 0x00, 0x7f, 0x8f, 0x1e, 0x7f, 0xc7, 0x81,
0xe3, 0xc3, 0xcf, 0x80, 0x07, 0xc0, 0xf0, 0x00, 0x00, 0x7f, 0xcf, 0x1e, 0x7f, 0xe7, 0x81, 0xe3,
0xe3, 0xe7, 0x81, 0x07, 0xc0, 0xf0, 0x00, 0x00, 0x7f, 0x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38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00,
0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xe0,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00
} ;
void setup() {
Serial.begin(9600);
if (!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) {
Serial.println(F("SSD1306 allocation failed"));
for (;;);
}
// Pause for 2 seconds
delay(2000);
// Clear the buffer.
display.clearDisplay();
// Draw bitmap on the screen
display.drawBitmap( 4, 13, logo, ANCHO_LOGO, ALTURA_LOGO, WHITE);
display.display();
for (int i = 0 ; i <= 40; i++) {
display.invertDisplay(true);
display.display();
delay(50);
display.invertDisplay(false);
display.display();
delay(50);
}
delay(5000);
display.clearDisplay();
display.setTextSize(1); // Normal 1:1 pixel scale
display.setTextColor(SSD1306_WHITE); // Draw white text
display.setCursor(0, 0); // Start at top-left corner
display.println(F("Bienvenido a NINJAGO"));
display.println(F("Comencemos"));
display.display();
display.clearDisplay();
for (int a = 0 ; a <= 48; a++) {
display.clearDisplay();
display.drawBitmap(40, 8, reloj_arena[a], FRAME_WIDTH, FRAME_HEIGHT, WHITE);
display.display();
delay(FRAME_DELAY);
}
}
void loop() {
}
However, I cannot display reloj_arena. It doesn't allow compillation, bcause it says that there is an error for Arduino Mega or Mega 2560.
Later I realized that, if I remove the library, it works. So the problem seems related with the .h and .ccp
The .h code:
#ifndef NinjagoOsBitmaps_h
#define NinjagoOsBitmaps_h
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
static const unsigned char reloj_arena [] PROGMEM;
static const unsigned char sonando_musica [] PROGMEM;
static const unsigned char play_music [] PROGMEM;
static const unsigned char reduce_vol [] PROGMEM;
static const unsigned char increase_vol [] PROGMEM;
static const unsigned char pause [] PROGMEM;
static const unsigned char candado [] PROGMEM;
#endif
and cpp:
#include "NinjagoOsBitmaps.h"
#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define FRAME_DELAY (42)
#define FRAME_WIDTH (48)
#define FRAME_HEIGHT (48)
#define FRAME_COUNT_RELOJ_ARENA (sizeof(reloj_arena) / sizeof(reloj_arena[0]))
#define FRAME_COUNT_SONANDO_MUSICA (sizeof(sonando_musica) / sizeof(sonando_musica[0]))
#define FRAME_COUNT_PLAY_MUSIC (sizeof(play_music) / sizeof(play_music[0]))
#define FRAME_COUNT_REDUCE_VOL (sizeof(reduce_vol) / sizeof(reduce_vol[0]))
#define FRAME_COUNT_INCREASE_VOL (sizeof(increase_vol) / sizeof(increase_vol[0]))
#define FRAME_COUNT_INCREASE_VOL (sizeof(pause) / sizeof(pause[0]))
#define FRAME_COUNT_CANDADO (sizeof(candado) / sizeof(candado[0]))
const byte PROGMEM reloj_arena[][288] = {
--the bitmap, I have removed some lines----
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,128,0,0,0,0,15,192,0,0,0,0,28,192,0,0,0,0,56,192,0,0,0,0,112,192,0,0,0,0,224,192,0,0,0,1,192,192,0,0,0,3,128,192,0,0,0,7,0,192,0,0,0,14,0,192,96,0,0,28,0,192,112,0,0,56,0,192,56,0,63,240,0,192,12,0,127,224,0,192,6,0,224,192,0,192,7,0,192,192,0,198,3,0,192,192,0,199,131,0,192,192,0,193,129,128,192,192,0,192,193,128,192,192,0,192,193,128,192,192,0,192,65,128,192,192,0,192,65,128,192,192,0,192,193,128,192,192,0,192,193,128,192,192,0,193,129,128,192,192,0,199,131,0,192,192,0,198,3,0,224,192,0,192,7,0,127,224,0,192,6,0,63,240,0,192,12,0,0,56,0,192,56,0,0,28,0,192,112,0,0,14,0,192,96,0,0,7,0,192,0,0,0,3,128,192,0,0,0,1,192,192,0,0,0,0,224,192,0,0,0,0,112,192,0,0,0,0,56,192,0,0,0,0,28,192,0,0,0,0,15,192,0,0,0,0,3,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
const byte PROGMEM sonando_music[][288] = {
--the bitmap, I have removed some lines----
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,128,0,0,0,0,15,192,0,0,0,0,28,192,0,0,0,0,56,192,0,0,0,0,112,192,14,0,0,0,224,192,7,0,0,1,192,192,3,192,0,3,128,192,0,192,0,7,0,192,0,96,0,14,0,192,96,48,0,28,0,192,112,56,0,56,0,192,56,24,63,240,0,192,12,12,127,224,0,192,6,12,224,192,0,192,7,6,192,192,0,198,3,6,192,192,0,199,131,3,192,192,0,193,129,131,192,192,0,192,193,131,192,192,0,192,193,131,192,192,0,192,65,131,192,192,0,192,65,131,192,192,0,192,193,131,192,192,0,192,193,131,192,192,0,193,129,131,192,192,0,199,131,3,192,192,0,198,3,6,224,192,0,192,7,6,127,224,0,192,6,12,63,240,0,192,12,12,0,56,0,192,56,24,0,28,0,192,112,56,0,14,0,192,96,48,0,7,0,192,0,96,0,3,128,192,0,192,0,1,192,192,3,192,0,0,224,192,7,0,0,0,112,192,14,0,0,0,56,192,0,0,0,0,28,192,0,0,0,0,15,192,0,0,0,0,3,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
const byte PROGMEM play_music[][288] = {
--the bitmap, I have removed some lines----
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,128,0,0,0,0,15,192,0,0,0,0,28,192,0,0,0,0,56,192,0,0,0,0,112,192,14,0,0,0,224,192,7,0,0,1,192,192,3,192,0,3,128,192,0,192,0,7,0,192,0,96,0,14,0,192,96,48,0,28,0,192,112,56,0,56,0,192,56,24,63,240,0,192,12,12,127,224,0,192,6,12,224,192,0,192,7,6,192,192,0,198,3,6,192,192,0,199,131,3,192,192,0,193,129,131,192,192,0,192,193,131,192,192,0,192,193,131,192,192,0,192,65,131,192,192,0,192,65,131,192,192,0,192,193,131,192,192,0,192,193,131,192,192,0,193,129,131,192,192,0,199,131,3,192,192,0,198,3,6,224,192,0,192,7,6,127,224,0,192,6,12,63,240,0,192,12,12,0,56,0,192,56,24,0,28,0,192,112,56,0,14,0,192,96,48,0,7,0,192,0,96,0,3,128,192,0,192,0,1,192,192,3,192,0,0,224,192,7,0,0,0,112,192,14,0,0,0,56,192,0,0,0,0,28,192,0,0,0,0,15,192,0,0,0,0,3,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
const byte PROGMEM reduce_vol[][288] = {
--the bitmap, I have removed some lines----
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,128,0,0,0,0,15,192,0,0,0,0,28,192,0,0,0,0,56,192,0,0,0,0,112,192,14,0,0,0,224,192,7,0,0,1,192,192,3,192,0,3,128,192,0,192,0,7,0,192,0,96,0,14,0,192,96,48,0,28,0,192,112,56,0,56,0,192,56,24,63,240,0,192,12,12,127,224,0,192,6,12,224,192,0,192,7,6,192,192,0,198,3,6,192,192,0,199,131,3,192,192,0,193,129,131,192,192,0,192,193,131,192,192,0,192,193,131,192,192,0,192,65,131,192,192,0,192,65,131,192,192,0,192,193,131,192,192,0,192,193,131,192,192,0,193,129,131,192,192,0,199,131,3,192,192,0,198,3,6,224,192,0,192,7,6,127,224,0,192,6,12,63,240,0,192,12,12,0,56,0,192,56,24,0,28,0,192,112,56,0,14,0,192,96,48,0,7,0,192,0,96,0,3,128,192,0,192,0,1,192,192,3,192,0,0,224,192,7,0,0,0,112,192,14,0,0,0,56,192,0,0,0,0,28,192,0,0,0,0,15,192,0,0,0,0,3,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
const byte PROGMEM increase_vol[][288] = {
--the bitmap, I have removed some lines----
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,128,0,0,0,0,15,192,0,0,0,0,28,192,0,0,0,0,56,192,0,0,0,0,112,192,14,0,0,0,224,192,7,0,0,1,192,192,3,192,0,3,128,192,0,192,0,7,0,192,0,96,0,14,0,192,96,48,0,28,0,192,112,56,0,56,0,192,56,24,63,240,0,192,12,12,127,224,0,192,6,12,224,192,0,192,7,6,192,192,0,198,3,6,192,192,0,199,131,3,192,192,0,193,129,131,192,192,0,192,193,131,192,192,0,192,193,131,192,192,0,192,65,131,192,192,0,192,65,131,192,192,0,192,193,131,192,192,0,192,193,131,192,192,0,193,129,131,192,192,0,199,131,3,192,192,0,198,3,6,224,192,0,192,7,6,127,224,0,192,6,12,63,240,0,192,12,12,0,56,0,192,56,24,0,28,0,192,112,56,0,14,0,192,96,48,0,7,0,192,0,96,0,3,128,192,0,192,0,1,192,192,3,192,0,0,224,192,7,0,0,0,112,192,14,0,0,0,56,192,0,0,0,0,28,192,0,0,0,0,15,192,0,0,0,0,3,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
const byte PROGMEM pause[][288] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,248,31,240,0,0,15,248,31,240,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,8,24,24,16,0,0,15,248,31,240,0,0,15,248,31,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
const byte PROGMEM candado[][288] = {
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,240,0,0,0,0,63,252,0,0,0,0,112,14,0,0,0,0,224,7,0,0,0,1,128,1,128,0,0,3,128,1,192,0,0,3,0,0,192,0,0,6,0,0,96,0,0,6,0,0,96,0,0,6,0,0,96,0,0,4,0,0,32,0,0,12,0,0,48,0,0,12,0,0,48,0,0,12,0,0,48,0,0,12,0,0,48,0,0,12,0,0,48,0,0,255,255,255,255,0,3,255,255,255,255,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,3,192,0,192,3,0,7,224,0,192,3,0,7,224,0,192,3,0,7,224,0,192,3,0,3,192,0,192,3,0,3,192,0,192,3,0,3,192,0,192,3,0,3,192,0,192,3,0,3,192,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,0,0,0,0,192,3,255,255,255,255,192,1,255,255,255,255,128}
};