Christmas sketch

This example shows you how to realize a simple Christmas sketch using an Industrial 101 board. 
Arduino Industrial 101 
In this project it is used a buzzer to play Christmas songs. 
Buzzer 
Also it is used a little oled display, assembled on Arduino Industrial 101, to show some Christmas pictures. 
Oled display

Hardware

  • Arduino Industrial 101
  • DogOled
  • Mini breadboard
  • A bunch of wires
  • Buzzer
  • Led
  • Resistor: 220 Ω

Circuit

Follow these steps to realize the circuit: 
- Assembly the DogOled on the Arduino Industrial 101 paying attention to insert it how shown in the picture: 
Assembly Oled display on Arduino Industrial 101 1/2  Assembly oled display on Arduino Industrial 101 2/2 
- Insert the buzzer on the breadboard and connect the positive pole to pin D5 of board and the negative to the GND. 
- Connect the anode of the LED (usually the longer pin) in series to a resistor of 220 Ω and to pin A0 of board. 
Instead connect the cathode of the LED to GND of board. 
- Plug in the board to PC. 
Now the circuit is ready.
Christmas sketch circuit 
Upload the sketch!

Code

The sketch uses a modified Adafruit library to communicate with the oled display. 
You can downlod it here
This sketch performs two Christmas songs: We Wish You A Merry Christmas and Jingle Bell. 
The notes of the songs are availables from this website: http://arduinomelodies.blogspot.it/ 
Also during the songs a Led turns on according of music and some Christmas pictures are shown on the oled display. 
The images inserted in this sketch are been converted using Image2Code. 
You can download it here.

The complete code and its detailed description are shown down.

 
/*************************************************
* Public Constants
*************************************************/
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
#define NOTE_F1 44
#define NOTE_FS1 46
#define NOTE_G1 49
#define NOTE_GS1 52
#define NOTE_A1 55
#define NOTE_AS1 58
#define NOTE_B1 62
#define NOTE_C2 65
#define NOTE_CS2 69
#define NOTE_D2 73
#define NOTE_DS2 78
#define NOTE_E2 82
#define NOTE_F2 87
#define NOTE_FS2 93
#define NOTE_G2 98
#define NOTE_GS2 104
#define NOTE_A2 110
#define NOTE_AS2 117
#define NOTE_B2 123
#define NOTE_C3 131
#define NOTE_CS3 139
#define NOTE_D3 147
#define NOTE_DS3 156
#define NOTE_E3 165
#define NOTE_F3 175
#define NOTE_FS3 185
#define NOTE_G3 196
#define NOTE_GS3 208
#define NOTE_A3 220
#define NOTE_AS3 233
#define NOTE_B3 247
#define NOTE_C4 262
#define NOTE_CS4 277
#define NOTE_D4 294
#define NOTE_DS4 311
#define NOTE_E4 330
#define NOTE_F4 349
#define NOTE_FS4 370
#define NOTE_G4 392
#define NOTE_GS4 415
#define NOTE_A4 440
#define NOTE_AS4 466
#define NOTE_B4 494
#define NOTE_C5 523
#define NOTE_CS5 554
#define NOTE_D5 587
#define NOTE_DS5 622
#define NOTE_E5 659
#define NOTE_F5 698
#define NOTE_FS5 740
#define NOTE_G5 784
#define NOTE_GS5 831
#define NOTE_A5 880
#define NOTE_AS5 932
#define NOTE_B5 988
#define NOTE_C6 1047
#define NOTE_CS6 1109
#define NOTE_D6 1175
#define NOTE_DS6 1245
#define NOTE_E6 1319
#define NOTE_F6 1397
#define NOTE_FS6 1480
#define NOTE_G6 1568
#define NOTE_GS6 1661
#define NOTE_A6 1760
#define NOTE_AS6 1865
#define NOTE_B6 1976
#define NOTE_C7 2093
#define NOTE_CS7 2217
#define NOTE_D7 2349
#define NOTE_DS7 2489
#define NOTE_E7 2637
#define NOTE_F7 2794
#define NOTE_FS7 2960
#define NOTE_G7 3136
#define NOTE_GS7 3322
#define NOTE_A7 3520
#define NOTE_AS7 3729
#define NOTE_B7 3951
#define NOTE_C8 4186
#define NOTE_CS8 4435
#define NOTE_D8 4699
#define NOTE_DS8 4978
/*Jingle Bell melody: 98 NOTES*/
int melody[] = {
              NOTE_G4,NOTE_E5,NOTE_D5,NOTE_C5,NOTE_G4,NOTE_G4,NOTE_E5,NOTE_D5,NOTE_C5,NOTE_A4,
              NOTE_A4,NOTE_F5,NOTE_E5,NOTE_D5,NOTE_B4,NOTE_G5,NOTE_G5,NOTE_F5,NOTE_D5,NOTE_E5,
              NOTE_G4,NOTE_E5,NOTE_D5,NOTE_C5,NOTE_G4,NOTE_G4,NOTE_E5,NOTE_D5,NOTE_C5,NOTE_A4,
              NOTE_A4,NOTE_F5,NOTE_E5,NOTE_D5,NOTE_G5,NOTE_G5,NOTE_G5,NOTE_G5,NOTE_G5,NOTE_A5,NOTE_G5,NOTE_F5,NOTE_D5,NOTE_C5,NOTE_G5,
              NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_G5,NOTE_C5,NOTE_D5,NOTE_E5,
              NOTE_F5,NOTE_F5,NOTE_F5,NOTE_F5,NOTE_F5,NOTE_F5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_D5,NOTE_D5,NOTE_E5,NOTE_D5,NOTE_G5,
              NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_G5,NOTE_C5,NOTE_D5,NOTE_E5,
              NOTE_F5,NOTE_F5,NOTE_F5,NOTE_F5,NOTE_F5,NOTE_F5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_E5,NOTE_G5,NOTE_G5,NOTE_F5,NOTE_D5,NOTE_C5,
};
/*Jingle Bell notes duration*/
int noteDurations[] = { 8,8,8,8,2,8,8,8,8,2, // 10
                      8,8,8,8,2,8,8,8,8,2, // 10
                      8,8,8,8,2,8,8,8,8,2, // 10
                      8,8,8,8,8,8,8,16,16,8,8,8,8,4,4, // 15
                      8,8,4,8,8,4,8,8,8,8,2, // 11
                      8,8,8,16,16,8,8,8,16,16,8,8,8,8,4,4, // 16
                      8,8,4,8,8,4,8,8,8,8,2, // 11
                      8,8,8,16,16,8,8,8,16,16,8,8,8,8,2, // 15
                      };
//We Wish You A Merry Christmas 84 NOTES
int melody1[] = {
  NOTE_G4,NOTE_C5,NOTE_C5,NOTE_D5,NOTE_C5,NOTE_B4,NOTE_A4,NOTE_A4,
  NOTE_A4,NOTE_D5,NOTE_D5,NOTE_E5,NOTE_D5,NOTE_C5,NOTE_B4,NOTE_G4,
  NOTE_G4,NOTE_E5,NOTE_E5,NOTE_F5,NOTE_E5,NOTE_D5,NOTE_C5,NOTE_A5,NOTE_G4,NOTE_G4,NOTE_A4,NOTE_D5,NOTE_B4,NOTE_C5,
  NOTE_G4,NOTE_C5,NOTE_C5,NOTE_D5,NOTE_C5,NOTE_B4,NOTE_A4,NOTE_A4,
  NOTE_A4,NOTE_D5,NOTE_D5,NOTE_E5,NOTE_D5,NOTE_C5,NOTE_B4,NOTE_G4,
  NOTE_G4,NOTE_E5,NOTE_E5,NOTE_F5,NOTE_E5,NOTE_D5,NOTE_C5,NOTE_A5,NOTE_G4,NOTE_G4,NOTE_A4,NOTE_D5,NOTE_B4,NOTE_C5,
  NOTE_G4,NOTE_C5,NOTE_C5,NOTE_C5,NOTE_B4,NOTE_B4,NOTE_C5,NOTE_B4,NOTE_A4,NOTE_G4,
  NOTE_D5,NOTE_E5,NOTE_D5,NOTE_D5,NOTE_C5,NOTE_C5,NOTE_G5,NOTE_G4,NOTE_G4,NOTE_G4,NOTE_A4,NOTE_D5,NOTE_B4,NOTE_C5
};
//We Wish You A Merry Christmas
int noteDurations1[] = {4,4,8,8,8,8,4,4,
                      4,4,8,8,8,8,4,4,
                      4,4,8,8,8,8,4,4,8,8,4,4,4,2,
                      4,4,8,8,8,8,4,4,
                      4,4,8,8,8,8,4,4,
                      4,4,8,8,8,8,4,4,8,8,4,4,4,2,
                      4,4,4,4,2,4,4,4,4,2,
                      4,4,8,8,8,8,4,4,8,8,4,4,4,2,  
                    };                    
                     
/*Include libreries*/                    
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
/*Define Oled_Reset important change for Arduino Industrial 101*/
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
/*Define constants*/
#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2
#define LOGO16_GLCD_HEIGHT 16
#define LOGO16_GLCD_WIDTH 16
/*logo star*/
static const unsigned char PROGMEM logo16_glcd_bmp[] =
{B00000000, B11000000,
B00000001, B11000000,
B00000001, B11000000,
B00000011, B11100000,
B11110011, B11100000,
B11111110, B11111000,
B01111110, B11111111,
B00110011, B10011111,
B00011111, B11111100,
B00001101, B01110000,
B00011011, B10100000,
B00111111, B11100000,
B00111111, B11110000,
B01111100, B11110000,
B01110000, B01110000,
B00000000, B00110000 };
//Check the dimension of display
#if(SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
//Picture: Arduino logo
const unsigned char PROGMEM arduino[] ={0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xf0,0xf,0xff,0xff,0xff,
0xff,0xff,0xff,0x80,0x1,0xff,0xff,0xff,
0xff,0xff,0xfe,0x0,0x0,0x3f,0xff,0xff,
0xff,0xff,0xf8,0x0,0x0,0x1f,0xff,0xff,
0xff,0xff,0xe0,0x0,0x0,0x7,0xff,0xff,
0xff,0xff,0xc0,0x0,0x0,0x3,0xff,0xff,
0xff,0xff,0x80,0x0,0x0,0x1,0xff,0xff,
0xff,0xff,0x0,0x0,0x0,0x0,0xff,0xff,
0xff,0xfe,0x0,0x0,0x0,0x0,0x7f,0xff,
0xff,0xfc,0x0,0x0,0x0,0x0,0x3f,0xff,
0xff,0xfc,0x0,0x0,0x0,0x0,0x3f,0xff,
0xff,0xf8,0x0,0x0,0x0,0x0,0x1f,0xff,
0xff,0xf8,0x0,0x0,0x0,0x0,0xf,0xff,
0xff,0xf0,0x0,0x0,0x0,0x0,0xf,0xff,
0xff,0xf0,0x1,0xc0,0x3,0xc0,0xf,0xff,
0xff,0xe0,0xf,0xf0,0xf,0xf0,0x7,0xff,
0xff,0xe0,0x1f,0xfc,0x3f,0xfc,0x7,0xff,
0xff,0xe0,0x3c,0x3e,0x7c,0x1e,0x7,0xff,
0xff,0xe0,0x70,0xf,0x70,0xe,0x7,0xff,
0xff,0xe0,0x70,0x7,0xe0,0x7,0x3,0xff,
0xff,0xc0,0xe0,0x3,0xe1,0x87,0x3,0xff,
0xff,0xc0,0xe3,0xe3,0xc3,0xc7,0x3,0xff,
0xff,0xc0,0xe3,0xc3,0xc3,0xc7,0x3,0xff,
0xff,0xc0,0xe0,0x7,0xe1,0x87,0x3,0xff,
0xff,0xe0,0x70,0x7,0xf0,0x7,0x3,0xff,
0xff,0xe0,0x78,0xe,0x78,0xe,0x7,0xff,
0xff,0xe0,0x3e,0x3c,0x3e,0x3c,0x7,0xff,
0xff,0xe0,0x1f,0xfc,0x1f,0xf8,0x7,0xff,
0xff,0xe0,0xf,0xf0,0xf,0xf0,0x7,0xff,
0xff,0xf0,0x0,0x0,0x0,0x0,0xf,0xff,
0xff,0xf0,0x0,0x0,0x0,0x0,0xf,0xff,
0xff,0xf8,0x0,0x0,0x0,0x0,0x1f,0xff,
0xff,0xf8,0x0,0x0,0x0,0x0,0x1f,0xff,
0xff,0xfc,0x0,0x0,0x0,0x0,0x3f,0xff,
0xff,0xfe,0x0,0x0,0x0,0x0,0x3f,0xff,
0xff,0xfe,0x0,0x0,0x0,0x0,0x7f,0xff,
0xff,0xff,0x0,0x0,0x0,0x0,0xff,0xff,
0xff,0xff,0x80,0x0,0x0,0x1,0xff,0xff,
0xff,0xff,0xc0,0x0,0x0,0x3,0xff,0xff,
0xff,0xff,0xf0,0x0,0x0,0x7,0xff,0xff,
0xff,0xff,0xf8,0x0,0x0,0x1f,0xff,0xff,
0xff,0xff,0xfe,0x0,0x0,0x7f,0xff,0xff,
0xff,0xff,0xff,0xc0,0x3,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xfd,0xff,0xff,0xdf,0xff,
0xff,0xf1,0x82,0x9,0x90,0x4d,0x87,0xff,
0xff,0xf1,0x9a,0x65,0x9d,0xc5,0x37,0xff,
0xff,0xf4,0x92,0x65,0x9d,0xc5,0x73,0xff,
0xff,0xe4,0x86,0x65,0x9d,0xd1,0x73,0xff,
0xff,0xe0,0x92,0x65,0x9d,0xd9,0x77,0xff,
0xff,0xee,0x9a,0xc,0x10,0xd9,0x7,0xff,
0xff,0xee,0xdb,0x3e,0x30,0x5d,0x8f,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
//Picture: Star & Merry Christmas
const unsigned char PROGMEM star[] = {
0xff,0xff,0xff,0x0,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xfe,0x0,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xf8,0x0,0x1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xf0,0x0,0x1,0xfc,0x7,0xfc,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xe0,0x0,0x0,0xf8,0xe1,0xf1,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xc0,0x0,0x0,0x67,0xe1,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0x0,0x0,0x0,0x6f,0xe1,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfe,0x0,0x0,0x0,0xf,0xe0,0xc7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfc,0x0,0x0,0x0,0xf,0xe0,0x87,0xf8,0x73,0x8c,0xe7,0x3c,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf8,0x0,0x0,0x0,0x1f,0xe0,0x83,0xe0,0x21,0x8,0x42,0x18,0x7f,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf0,0x0,0x0,0x0,0xf,0xe0,0x3,0xc4,0x0,0x0,0x80,0xc,0x7f,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf0,0x0,0x0,0x0,0xcf,0xe0,0x3,0xc6,0x70,0x8c,0x21,0x8e,0x7f,0xff,0xff,0xff,0xff,0xf8,
0xff,0xe0,0x0,0x0,0x7,0xc7,0xec,0x23,0x8c,0xf1,0x9c,0x6f,0xc6,0x7f,0xff,0xff,0xff,0xff,0xf8,
0xff,0xe0,0x0,0x0,0x1f,0xc7,0xec,0x21,0x8d,0xf3,0xbc,0x7f,0xc6,0x7f,0xff,0xff,0xff,0xff,0xf8,
0xff,0xe0,0x0,0x0,0x7f,0xe3,0xcc,0x61,0x83,0xf1,0xfc,0xff,0xe2,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xe0,0x0,0x7,0xff,0xe7,0xce,0x61,0x87,0xf1,0xfc,0x7f,0xe1,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xc0,0x0,0x7f,0xff,0xf7,0xde,0x70,0xc3,0x31,0xfc,0x7f,0xf1,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xc0,0x1,0xff,0xff,0xff,0x9e,0x70,0x40,0x71,0xfc,0x7f,0xf3,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xc0,0x3,0xff,0xff,0x8f,0x9f,0xf0,0x60,0xf3,0xfd,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xc0,0x7,0xff,0xff,0x9f,0x3f,0xf8,0x3f,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0x80,0x7,0xf9,0xe3,0x80,0x3f,0xfc,0x1f,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0x80,0xf,0xf1,0xe3,0xc0,0x33,0xfc,0x1f,0xff,0xff,0xff,0xc7,0xff,0xff,0xff,0xff,0xff,0xf8,
0xf0,0x0,0x1f,0xfb,0xf7,0xc0,0x0,0x0,0x3,0xc3,0xff,0xfc,0x47,0xff,0xff,0xff,0xff,0xff,0xf8,
0xc0,0x0,0x3f,0xfe,0x1f,0xe1,0xff,0x80,0x3,0x87,0xff,0xf8,0x7,0x7f,0xff,0xff,0xff,0xff,0xf8,
0x8e,0x0,0x7f,0xfe,0xf,0xff,0xff,0xcc,0x71,0x1f,0xff,0xf8,0x47,0x7d,0xff,0xff,0xff,0xff,0xf8,
0x9c,0x0,0x7f,0xfe,0xf,0xbf,0xff,0x8e,0x79,0x1f,0xff,0xfc,0xc0,0x79,0xff,0xff,0xff,0xff,0xf8,
0x9c,0x0,0xff,0xbb,0x1f,0x3f,0xff,0x1e,0x7c,0x1f,0xff,0xff,0xff,0xf1,0xff,0xff,0xff,0xff,0xf8,
0x9c,0x1,0xff,0xa3,0xff,0xff,0xff,0x1e,0x7f,0x1e,0xf7,0xdf,0xf9,0x60,0xff,0xf9,0xfc,0x1e,0xd8,
0xc8,0x1,0xff,0xe7,0xfd,0xff,0xfe,0x1c,0x7f,0x18,0xe3,0x8,0x60,0x0,0x84,0x30,0xf0,0x18,0x18,
0xe8,0x3,0xff,0xef,0xfc,0xdf,0xfe,0x1c,0xff,0x10,0x42,0x4,0x67,0x71,0x80,0x20,0xe3,0x1b,0x98,
0xf0,0x7,0xff,0xc7,0xfc,0xff,0xfe,0x11,0xff,0x0,0x40,0x9c,0x63,0xf1,0xc2,0x8,0xc7,0x18,0xf8,
0xf8,0x7,0xff,0xd8,0xe3,0xff,0xfe,0x7,0xff,0xc,0x61,0xbc,0x60,0xf1,0xc2,0x18,0xc7,0x18,0x38,
0xf0,0xf,0xff,0xfe,0x1f,0xff,0xfe,0xf,0xff,0x1c,0x63,0x7c,0x60,0x71,0xc6,0x38,0xc7,0x18,0x18,
0xf0,0x1f,0xff,0xff,0xff,0xff,0xfe,0x1f,0xff,0x1c,0x63,0xfc,0x78,0x33,0xc6,0x38,0xc7,0x1c,0x8,
0xf0,0x1f,0xff,0xff,0xff,0xff,0xfe,0x1f,0xff,0x1c,0x73,0xfc,0x6e,0x31,0xc6,0x38,0x80,0x1f,0x8,
0xf0,0x1f,0xff,0xff,0xff,0xff,0xfe,0xf,0xff,0x1c,0xe3,0xfc,0x6f,0x30,0x46,0x38,0xc0,0x13,0xc8,
0xfe,0x47,0xff,0xff,0xff,0xff,0xfc,0xf,0xff,0x1c,0x23,0xfc,0x22,0x30,0xc6,0x38,0x41,0x0,0x88,
0xff,0xe7,0xff,0xff,0xff,0xff,0xf9,0x7,0xfe,0x3e,0x77,0xfc,0x62,0xf1,0xcf,0x7a,0xe7,0x18,0x38,
0xff,0xf3,0xff,0xff,0xff,0xff,0xf3,0x87,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfd,0xff,0xff,0xff,0xff,0xe7,0xc1,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfc,0xff,0xff,0xff,0xff,0xef,0xe0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfe,0xff,0xff,0xff,0xff,0xdf,0xf8,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfe,0x7f,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfe,0x7f,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfe,0x7f,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfe,0x7f,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfe,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfc,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfc,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfc,0xff,0xff,0xff,0xff,0xef,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xfd,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf9,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf9,0xff,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf9,0xff,0xfc,0xf,0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf3,0xff,0xf0,0xe3,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf3,0xff,0xe3,0xf8,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf3,0xff,0x8f,0xfc,0x7f,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf3,0xff,0x1f,0xff,0x1f,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf7,0xfc,0x7f,0xff,0x8f,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf3,0xf1,0xff,0xff,0xe3,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf3,0xe3,0xff,0xff,0xf8,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf1,0x8f,0xff,0xff,0xfc,0x73,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xf8,0x3f,0xff,0xff,0xff,0x7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8
};
const unsigned char PROGMEM bell[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xef,0xff,0xff,
0xff,0xff,0xff,0xff,0xfe,0x3,0xff,0xff,
0xff,0xfe,0x3,0xff,0xf8,0x7d,0xff,0xff,
0xff,0xf9,0xfd,0xff,0xf1,0xfe,0xff,0xff,
0xff,0xf3,0xfe,0x7f,0xf3,0xfe,0xff,0xff,
0xff,0xe7,0xff,0x3f,0xe7,0xfe,0xff,0xff,
0xff,0xcf,0xff,0x9f,0xc7,0xfe,0xff,0xff,
0xff,0xcf,0xff,0xdf,0x8f,0xfe,0xff,0xff,
0xff,0x9f,0xff,0xcf,0x9f,0xff,0xff,0xff,
0xff,0x91,0xff,0xef,0x3b,0x7d,0xff,0xff,
0xff,0x9f,0xff,0xee,0x27,0xbd,0xff,0xff,
0xff,0x9f,0x8f,0xee,0x4f,0xcb,0xff,0xff,
0xff,0x9f,0xe7,0xee,0xcf,0xcb,0xff,0xff,
0xff,0x1f,0xf3,0xec,0xdf,0xe3,0xff,0xff,
0xff,0x1f,0xf8,0xec,0x9f,0xe7,0xff,0xff,
0xff,0xf,0xfc,0x6c,0x1f,0xe7,0xff,0xff,
0xff,0x8f,0xfe,0x3d,0x3f,0x86,0xb,0xff,
0xff,0x87,0xff,0x1c,0x3f,0x21,0xf9,0xff,
0xff,0xc3,0xff,0x18,0x38,0xc7,0xfc,0xff,
0xff,0xe1,0xff,0x8,0x63,0x3f,0xfe,0xff,
0xff,0xe0,0xfe,0xc0,0x44,0xef,0xfe,0xff,
0xff,0xf8,0x39,0xe0,0x9,0xef,0xfd,0xff,
0xff,0xfe,0x0,0xb0,0x17,0xff,0xfb,0xff,
0xff,0xff,0xf9,0xc0,0x2f,0x9f,0xf7,0xff,
0xff,0xff,0xff,0xb0,0x0,0x3f,0xef,0xff,
0xff,0xff,0x8d,0x38,0xf,0xff,0xcf,0xff,
0xff,0xfe,0x0,0x38,0x67,0xff,0xdf,0xff,
0xff,0xf8,0x0,0x30,0x63,0xff,0xbf,0xff,
0xff,0xf0,0xf0,0x0,0xc1,0xff,0x7f,0xff,
0xff,0xe3,0xe0,0x0,0x0,0x7f,0x7f,0xff,
0xff,0x87,0xc0,0x40,0xc,0x3e,0x7f,0xff,
0xfe,0x1f,0x80,0x44,0x3f,0x1e,0xff,0x7,
0xc0,0x3e,0x0,0x84,0x7f,0x8e,0xfd,0xe7,
0x80,0x7c,0x1,0x8c,0x7f,0xe6,0xfd,0xfb,
0xc9,0xfc,0x7,0x0,0x7f,0xf2,0x7f,0xf9,
0xec,0xf8,0xf,0x0,0x7f,0xfa,0x7f,0xf9,
0xf6,0x78,0x1e,0x8,0x3f,0xfc,0x7f,0xf9,
0xfb,0x78,0x1e,0x8,0x3f,0xfd,0xbf,0xf9,
0xfe,0x98,0x3c,0x8,0x3f,0xff,0xdf,0xfb,
0xff,0x0,0x38,0x18,0x3f,0xff,0xff,0xe7,
0xff,0x80,0x70,0x18,0x2f,0xfe,0xf,0x8f,
0xff,0xc0,0x20,0x38,0xf,0xc0,0x0,0x7f,
0xff,0xe0,0x0,0x78,0x5e,0x0,0x1,0xff,
0xff,0xf0,0x0,0xf8,0x30,0x0,0x0,0xff,
0xff,0xf8,0x0,0xf0,0x0,0x0,0x0,0x7f,
0xff,0xfc,0x0,0xf0,0x0,0x0,0x0,0xff,
0xff,0xfe,0x1,0xf0,0x0,0x0,0x0,0xff,
0xff,0xff,0x1,0xf4,0x0,0x0,0x0,0xff,
0xff,0xff,0x81,0xf0,0x0,0x0,0x5,0xff,
0xff,0xff,0xc1,0xe0,0x0,0x0,0x1b,0xff,
0xff,0xff,0xe1,0xe0,0x0,0x0,0x77,0xff,
0xff,0xff,0xfb,0xe0,0x0,0x1,0x6f,0xff,
0xff,0xff,0xff,0xc0,0x0,0x3,0xbf,0xff,
0xff,0xff,0xff,0xcc,0x20,0x2e,0x7f,0xff,
0xff,0xff,0xff,0xec,0x26,0x7b,0xff,0xff,
0xff,0xff,0xff,0xe6,0x1f,0xc7,0xff,0xff,
0xff,0xff,0xff,0xf3,0xdc,0x1f,0xff,0xff,
0xff,0xff,0xff,0xe0,0x0,0xf,0xff,0xff,
0xff,0xff,0xff,0xfe,0x0,0x7f,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
 
/*setup*/
void setup()   {              
  pinMode(A0, OUTPUT);//Inizialize the Led on A0 pin
  digitalWrite(A0, LOW);//Turn off the Led
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C); //Initialize with the I2C addr 0x3D (for the 128x64)
  display.display();//Enables the display
  delay(2000);//Wait 2 seconds
  display.clearDisplay();//Clear display
  digitalWrite(A0, HIGH);//Turn on the Led
  display.drawBitmap(32, 0, arduino, 64, 64, WHITE);//Print Arduino logo
  display.display();//Enable the print on display
  delay(2000);//Wait 2 seconds
  digitalWrite(A0, LOW);//Turn off the Led
}
/*loop*/
void loop() {
display.clearDisplay();//Clear display
display.drawBitmap(0, 0, star, 149, 64, WHITE);//Print picture Star & Merry Christmas
display.display();//Enable the print on display
/*Execution the We Wish You A Merry Christmas song*/
for (int thisNote = 0; thisNote < 84; thisNote++)
            {
// calculate the note duration by dividing
// one second by the note type
              int noteDuration1 = 1000 / noteDurations1[thisNote];
tone(5, melody1[thisNote], noteDuration1);
              digitalWrite(A0, HIGH); // Turn on the Led
// adding delay after a note to make them distinguishable
// the note's duration + 30% seems to work well:
int pauseBetweenNotes1 = noteDuration1 * 1.30;
delay(pauseBetweenNotes1);
// stop the playing note
              noTone(5);  
              digitalWrite(A0, LOW);//Turn off the Led
              delay(50);
            }
   
delay(1000);//wait 1 second
display.clearDisplay();//Clear display
pictureroll();//Call pictureroll function
/*Execution the Jingle Bell song*/
for (int thisNote = 0; thisNote < 98; thisNote++)
            {
// calculate the note duration by dividing
// one second by the note type
              int noteDuration = 1000 / noteDurations[thisNote];
tone(5, melody[thisNote], noteDuration);
              digitalWrite(A0, HIGH); // Turn on the Led
// adding delay after a note to make them distinguishable
// the note's duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
// stop the playing note
              noTone(5);  
              digitalWrite(A0, LOW);//Turn off the Led
              delay(50);
            }
          delay(1000);
display.clearDisplay();//Clear display
testscroll();//Call testscroll function
delay(1000);//Wait 2 seconds
display.clearDisplay();//Clear display
testdrawbitmap(logo16_glcd_bmp, LOGO16_GLCD_HEIGHT, LOGO16_GLCD_WIDTH);//Call testdrawbitmap function
}
 
/*testscroll function*/
void testscroll(void) {
display.setTextSize(2);//Size text
display.setTextColor(WHITE);//Color text
display.setCursor(10,21);//Position text
display.clearDisplay();//Clear display
display.println("Christmas");//Print: Christmas
display.display();//Enable the print on display
digitalWrite(A0, HIGH);//Turn on Led
display.startscrollright(0x00, 0x0F);//Move right the text
delay(810);//wait
digitalWrite(A0, LOW);//Turn off Led
display.stopscroll();//stop move text
delay(810);//wait
digitalWrite(A0, HIGH);//Turn on Led
display.startscrollleft(0x00, 0x0F);//Move left the text
delay(1400);//wait
digitalWrite(A0, LOW);//Turn off Led
display.stopscroll();//stop move text
delay(2000);//wait
digitalWrite(A0, HIGH);//Turn on Led
display.startscrolldiagright(0x00, 0x07);//Move in diagonal right the text
delay(2000);//wait
display.startscrolldiagleft(0x00, 0x07);//Move in diagonal left the text
delay(2000);//wait
display.stopscroll();//stop move text
digitalWrite(A0, LOW);//Turn off Led
}
/*testdrawbitmap*/
void testdrawbitmap(const uint8_t *bitmap, uint8_t w, uint8_t h) {
uint8_t icons[NUMFLAKES][3];
 
// initialize
for (uint8_t f=0; f< NUMFLAKES; f++) {
  icons[f][XPOS] = random(display.width());
  icons[f][YPOS] = 0;
  icons[f][DELTAY] = random(5) + 1;
 
  Serial.print("x: ");
  Serial.print(icons[f][XPOS], DEC);
  Serial.print(" y: ");
  Serial.print(icons[f][YPOS], DEC);
  Serial.print(" dy: ");
  Serial.println(icons[f][DELTAY], DEC);
}
 
while (1) {
  // draw each icon
  digitalWrite(A0, HIGH);
  for (uint8_t f=0; f< NUMFLAKES; f++) {
    display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, WHITE);
  }
  display.display();
  delay(200);
  digitalWrite(A0, LOW);
  // then erase it + move it
  for (uint8_t f=0; f< NUMFLAKES; f++) {
    display.drawBitmap(icons[f][XPOS], icons[f][YPOS], logo16_glcd_bmp, w, h, BLACK);
    // move it
    icons[f][YPOS] += icons[f][DELTAY];
    // if its gone, reinit
    if (icons[f][YPOS] > display.height()) {
icons[f][XPOS] = random(display.width());
icons[f][YPOS] = 0;
icons[f][DELTAY] = random(5) + 1;
    }
  }
  }
}
/*pictureroll function*/
void pictureroll(void) {
display.clearDisplay();//Clear display
digitalWrite(A0, HIGH);//Turn on Led
display.drawBitmap(32, 0, bell, 64, 64, WHITE);//Show bell picture on display
display.display();//Enable the print on display
delay(2000);//Wait 2 seconds
digitalWrite(A0, LOW);//Turn off Led
display.startscrolldiagright(0x00, 0x07);//Move in diagonal right the picture
delay(2000);//Wait 2 second
digitalWrite(A0, HIGH);//Turn on Led
display.startscrolldiagleft(0x00, 0x07);//Move in diagonal left the picture
delay(2000);//Wait 2 second
digitalWrite(A0, LOW);//Turn off Led
display.stopscroll();//Stop movement picture
}

Preview sketch

- Initialization display with Arduino logo 
Christmas sketch preview 1/6 
- Merry Christmas picture during We Wish You A Merry Christmas song 
Christmas sketch preview 2/6 
- Bell picture during Jingle Bell song 
Christmas sketch preview 3/6 
- Christmas label 
Christmas sketch preview 4/6 
- Effect shooting Stars 
Christmas sketch preview 5/6 
Christmas sketch preview 6/6 
NOTE: 
The Arduino Industrial 101 images could differ from the real board.