Design Specifications (Software)

Page

We have included our initial code for our PCB which uses digital pins as well as our final code for our piezo piano which uses analog pins. To obtain the gerber files for our PCB, please contact us.



Initial Code for PCB

#include <pitches.h>;
#include <themes.h>;
#include <Wire.h>
//need to download Adafruit_RCBLCDShield library
#include <Adafruit_RGBLCDShield.h>
#include <utility/Adafruit_MCP23017.h>

Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

#define WHITE 0x7

int boardpin[10] = {27, 28, 30, 31, 33, 34, 36, 37, 39, 40};
int speaker = 8;
int i;
int notes[10] = {NOTE_C4, NOTE_CS4, NOTE_D4, NOTE_DS4, NOTE_E4, NOTE_F4,
 NOTE_FS4, NOTE_G4, NOTE_GS4, NOTE_A4
 };
String notes_name[10] = {"NOTE_C4", "NOTE_CS4", "NOTE_D4", "NOTE_DS4", "NOTE_E4",
 "NOTE_F4", "NOTE_FS4", "NOTE_G4", "NOTE_GS4", "NOTE_A4"
 };
int scores[3] = {1, 2, 3};
int total = 0, index = 0
 unsigned long previous_time = 0;

//function plays "Victory"
void Play_Victory()
{
 for (int thisNote = 0; thisNote < (sizeof(victory_note) / sizeof(int)); thisNote++) {

int noteDuration = 1000 / victory_duration[thisNote];//convert duration to time delay
 tone(8, victory_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 2; //Here 1.05 is tempo, increase to play it slower
 delay(pauseBetweenNotes);
 noTone(8); //stop music on pin 8
 }
}

//function plays "Crazy Frog"
void Play_CrazyFrog()
{
 for (int thisNote = 0; thisNote < (sizeof(CrazyFrog_note) / sizeof(int)); thisNote++) {

int noteDuration = 1000 / CrazyFrog_duration[thisNote]; //convert duration to time delay
 tone(8, CrazyFrog_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.30;//Here 1.30 is tempo, decrease to play it faster
 delay(pauseBetweenNotes);
 noTone(8); //stop music on pin 8
 }
}

//function plays "Mario Underworld"
void Play_MarioUW()
{
 for (int thisNote = 0; thisNote < (sizeof(MarioUW_note) / sizeof(int)); thisNote++) {

int noteDuration = 1000 / MarioUW_duration[thisNote];//convert duration to time delay
 tone(8, MarioUW_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.80;
 delay(pauseBetweenNotes);
 noTone(8); //stop music on pin 8
 }
}

//function plays "Star Wars"
void Play_Star_Wars()
{
 for (int thisNote = 0; thisNote < (sizeof(star_note) / sizeof(int)); thisNote++) {

int noteDuration = 1000 / star_duration[thisNote];//convert duration to time delay
 tone(8, star_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 2.40;
 delay(pauseBetweenNotes);
 noTone(8); //stop music on pin 8
 }
}

//function plays "Jingle Bells"
void Play_Jingle()
{
 for (int thisNote = 0; thisNote < (sizeof(Jingle_note) / sizeof(int)); thisNote++) {
 int noteDuration = 1000 / Jingle_duration[thisNote];
 tone(8, Jingle_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.30;
 delay(pauseBetweenNotes);
 noTone(8);
 }
}

void Play_End_Music()
{
 for (int thisNote = 0; thisNote < (sizeof(end_music_note) / sizeof(int)); thisNote++) {
 int noteDuration = 1000 / end_music_duration[thisNote];
 tone(8, end_music_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.30;
 delay(pauseBetweenNotes);
 noTone(8);
 }
}

void Play_Begin_Music()
{
 for (int thisNote = 0; thisNote < (sizeof(begin_music_note) / sizeof(int)); thisNote++) {
 int noteDuration = 1000 / begin_music_duration[thisNote];
 tone(8, begin_music_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.30;
 delay(pauseBetweenNotes);
 noTone(8);
 }
}

void setup() {
 Serial.begin(9600);
 pinMode(8, OUTPUT);

lcd.begin(16, 2);
}

void loop() {
 total = 0;
 previous_time = millis();

lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Game Begins");
 Play_Begin_Music();
 Serial.println("Game Begins");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));
 lcd.setBacklight(WHITE);

//game has 2 min time limit
 while (int(millis() - previous_time) <= 120000)
 { for (i = 0; i < 10; i++) {
 if (digitalRead(boardpin[i]) == HIGH) {

//production of melody
 Serial.println(String(boardpin[i]) + " " + String(notes_name[i]));
 tone(speaker, notes[i], 1000 / 4);
 digitalWrite(speaker, HIGH);

//score system
 index = boardpin[i] % 3;
 total += scores[index];
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 //line 1 prints name of note played; line 2 prints total score
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print(notes_name[i]);
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }
 }

//song will be played
 if (digitalRead(29) == HIGH) {
 Play_Victory();

//score system
 total += scores[2];
 Serial.println("Victory");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Pirates");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }

if (digitalRead(32) == HIGH) {
 Play_CrazyFrog();

//score system
 total += scores[2];
 Serial.println("Crazy Frog");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Crazy Frog");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }

if (digitalRead(35) == HIGH) {
 Play_MarioUW();

//score system
 total += scores[2];
 Serial.println("Mario");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Mario");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }

if (digitalRead(38) == HIGH) {
 Play_Star_Wars();

//score system
 total += scores[2];
 Serial.println("Star Wars");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Star Wars");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }

if (digitalRead(41) == HIGH) {
 Play_Jingle();

//score system
 total += scores[2];
 Serial.println("Jingle Bells");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Jingle Bells");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }
 }

lcd.clear();
 lcd.print("Game Over");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));
 Play_End_Music();
 Serial.println("Game Over");
 Serial.println(String("Score: ") + String(total));

while (1)
 {
 uint8_t buttons = lcd.readButtons();
 if (buttons & BUTTON_SELECT)
 break;
 }
}

 

Final Code for Scaled-Up Piezo Pianos

#include <pitches.h>;
 #include <themes.h>;
 #include <Wire.h>
 //need to download Adafruit_RCBLCDShield library
 #include <Adafruit_RGBLCDShield.h>
 #include <utility/Adafruit_MCP23017.h>

Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();

#define WHITE 0x7

int boardpin[15] = {A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, A13, A14, A15};
 String boardpin_name[15] = {"A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10", "A11", "A12", "A13", "A14", "A15"};
 int speaker = 8;
 int i, j, reading, max_reading = 0;
 int threshold = 500;

int notes[10] = {NOTE_C4, NOTE_CS4, NOTE_D4, NOTE_DS4, NOTE_E4, NOTE_F4,
 NOTE_FS4, NOTE_G4, NOTE_GS4, NOTE_A4
 };
 String notes_name[10] = {"NOTE_C4", "NOTE_CS4", "NOTE_D4", "NOTE_DS4", "NOTE_E4",
 "NOTE_F4", "NOTE_FS4", "NOTE_G4", "NOTE_GS4", "NOTE_A4"
 };
 int scores[3] = {1, 2, 3};
 int total = 0, index = 0;
 unsigned long previous_time = 0;

unsigned long lastDebounceTime = 0; // the last time the output pin was toggled
 unsigned long debounceDelay = 1000; // the debounce time; increase if the output flickers

//function plays "Victory"
 void Play_Victory()
 {
 for (int thisNote = 0; thisNote < (sizeof(victory_note) / sizeof(int)); thisNote++) {

int noteDuration = 1000 / victory_duration[thisNote];//convert duration to time delay
 tone(8, victory_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 2; //Here 1.05 is tempo, increase to play it slower
 delay(pauseBetweenNotes);
 noTone(8); //stop music on pin 8
 }
 }

//function plays "Crazy Frog"
 void Play_CrazyFrog()
 {
 for (int thisNote = 0; thisNote < (sizeof(CrazyFrog_note) / sizeof(int)); thisNote++) {

int noteDuration = 1000 / CrazyFrog_duration[thisNote]; //convert duration to time delay
 tone(8, CrazyFrog_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.30;//Here 1.30 is tempo, decrease to play it faster
 delay(pauseBetweenNotes);
 noTone(8); //stop music on pin 8
 }
 }

//function plays "Mario Underworld"
 void Play_MarioUW()
 {
 for (int thisNote = 0; thisNote < (sizeof(MarioUW_note) / sizeof(int)); thisNote++) {

int noteDuration = 1000 / MarioUW_duration[thisNote];//convert duration to time delay
 tone(8, MarioUW_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.80;
 delay(pauseBetweenNotes);
 noTone(8); //stop music on pin 8
 }
 }

//function plays "Star Wars"
 void Play_Star_Wars()
 {
 for (int thisNote = 0; thisNote < (sizeof(star_note) / sizeof(int)); thisNote++) {

int noteDuration = 1000 / star_duration[thisNote];//convert duration to time delay
 tone(8, star_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 2.40;
 delay(pauseBetweenNotes);
 noTone(8); //stop music on pin 8
 }
 }

//function plays "Jingle Bells"
 void Play_Jingle()
 {
 for (int thisNote = 0; thisNote < (sizeof(Jingle_note) / sizeof(int)); thisNote++) {
 int noteDuration = 1000 / Jingle_duration[thisNote];
 tone(8, Jingle_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.30;
 delay(pauseBetweenNotes);
 noTone(8);
 }
 }

void Play_End_Music()
 {
 for (int thisNote = 0; thisNote < (sizeof(end_music_note) / sizeof(int)); thisNote++) {
 int noteDuration = 1000 / end_music_duration[thisNote];
 tone(8, end_music_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.30;
 delay(pauseBetweenNotes);
 noTone(8);
 }
 }

void Play_Begin_Music()
 {
 for (int thisNote = 0; thisNote < (sizeof(begin_music_note) / sizeof(int)); thisNote++) {
 int noteDuration = 1000 / begin_music_duration[thisNote];
 tone(8, begin_music_note[thisNote], noteDuration);

int pauseBetweenNotes = noteDuration * 1.30;
 delay(pauseBetweenNotes);
 noTone(8);
 }
 }

void setup() {
 Serial.begin(9600);
 pinMode(8, OUTPUT);

lcd.begin(16, 2);
 }

void loop() {
 total = 0;
 previous_time = millis();

lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Game Begins");
 Play_Begin_Music();
 Serial.println("Game Begins");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));
 lcd.setBacklight(WHITE);

//game has 2 min time limit
 while (int((millis() - previous_time) / 1000) < 45)
 {
 max_reading = 0;
 j = -1;

for (i = 0; i < 15; i++)
 {
 reading = analogRead(boardpin[i]);
 if (reading > threshold && ((millis() - lastDebounceTime) > debounceDelay))
 {
 if (reading > max_reading)
 { max_reading = reading;
 j = i;
 }
 }
 }

if ((j != -1) && (j < 10))
 {
 lastDebounceTime = millis();

//production of melody
 Serial.println(String(boardpin_name[j]) + " " + String(notes_name[j]));
 tone(speaker, notes[j], 150);

//score system
 index = boardpin[j] % 2;
 total += scores[index];
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 //line 1 prints name of note played; line 2 prints total score
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print(notes_name[j]);
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }



//song will be played
 if (j == 10) {
 lastDebounceTime = millis();
 Play_Victory();

//score system
 total += scores[2];
 Serial.println("Victory");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Victory");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }

if (j == 11) {
 lastDebounceTime = millis();
 Play_CrazyFrog();

//score system
 total += scores[2];
 Serial.println("Crazy Frog");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Crazy Frog");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }

if (j == 12) {
 lastDebounceTime = millis();
 Play_MarioUW();

//score system
 total += scores[2];
 Serial.println("Mario");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Mario");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }

if (j == 13) {
 lastDebounceTime = millis();
 Play_Star_Wars();

//score system
 total += scores[2];
 Serial.println("Star Wars");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Star Wars");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }

if (j == 14) {
 lastDebounceTime = millis();
 Play_Jingle();

//score system
 total += scores[2];
 Serial.println("Jingle Bells");
 Serial.println(String("Score: ") + String(total));

//printing on lcd
 lcd.clear();
 lcd.setCursor(0, 0);
 lcd.print("Jingle Bells");
 lcd.setCursor(0, 1);
 lcd.print(String("Score: ") + String(total));

//timing
 Serial.println(String(int((millis() - previous_time) / 1000)) + (" seconds have elapsed"));
 }
 }

lcd.clear();
 lcd.print("Game Over");
 lcd.setCursor(0,1);
 lcd.print(String("Score: ") + String(total));
 Play_End_Music();
 Serial.println("Game Over");
 Serial.println(String("Score: ") + String(total));

while (1)
 {
 uint8_t buttons = lcd.readButtons();
 if (buttons & BUTTON_SELECT)
 break;
 }
 }

Header files

<pitches.h>

#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

<themes.h>

Adapted from:
 * Code by : B.Aswinth Raj
 * Dated: 15-06-2017
 * Website: CircuitDigest.com

//##############**Victory**##############//
 int victory_note[] = {
 NOTE_C4, NOTE_C4, NOTE_C4, NOTE_C4, NOTE_GS3, NOTE_AS3, NOTE_C4, 0, 0, NOTE_GS3, NOTE_C4
 };
 int victory_duration[] = {
 12,12,12,4,4,4,16,16,16,16,4
 };
 //###########End of Victory#############//



//##############**"Crazy Frog" song of Crazy frog album**##############//
 int CrazyFrog_note[] = {
 NOTE_D4, 0, NOTE_F4, NOTE_D4, 0, NOTE_D4, NOTE_G4, NOTE_D4, NOTE_C4,
 NOTE_D4, 0, NOTE_A4, NOTE_D4, 0, NOTE_D4, NOTE_AS4, NOTE_A4, NOTE_F4,
 NOTE_D4, NOTE_A4, NOTE_D5, NOTE_D4, NOTE_C4, 0, NOTE_C4, NOTE_A3, NOTE_E4, NOTE_D4,
 0,NOTE_D4,NOTE_D4
 };
 int CrazyFrog_duration[] = {
 8, 8, 6, 16, 16, 16, 8, 8, 8,
 8, 8, 6, 16, 16, 16, 8, 8, 8,
 8, 8, 8, 16, 16, 16, 16, 8, 8, 2,
 8,4,4
 };
 //###########End of Crazy Frog#############//



//##############**"Mario underworld" **##############//
 int MarioUW_note[] = {
 NOTE_C4, NOTE_C5, NOTE_A3, NOTE_A4,NOTE_AS3, NOTE_AS4, 0, 0,
 NOTE_C4, NOTE_C5, NOTE_A3, NOTE_A4, NOTE_AS3, NOTE_AS4, 0,0,
 NOTE_F3, NOTE_F4, NOTE_D3, NOTE_D4,NOTE_DS3, NOTE_DS4, 0, 0,
 NOTE_F3, NOTE_F4, NOTE_D3, NOTE_D4,NOTE_DS3, NOTE_DS4, 0,
 0, NOTE_DS4, NOTE_CS4, NOTE_D4,
 NOTE_CS4, NOTE_DS4, NOTE_DS4, NOTE_GS3, NOTE_G3, NOTE_CS4,
 NOTE_C4, NOTE_FS4, NOTE_F4, NOTE_E3, NOTE_AS4, NOTE_A4,
 NOTE_GS4, NOTE_DS4, NOTE_B3, NOTE_AS3, NOTE_A3, NOTE_GS3,0, 0, 0
 };
 int MarioUW_duration[] = {
 12, 12, 12, 12,12, 12, 6,3,
 12, 12, 12, 12, 12, 12, 6, 3,
 12, 12, 12, 12, 12, 12, 6,
 3, 12, 12, 12, 12,
 12, 12, 6, 6, 18, 18, 18,
 6, 6, 6, 6,6, 6,
 18, 18, 18, 18, 18, 18, 10, 10, 10,
 10, 10, 10, 3, 3, 3
 };
 //###########End of Mario underworld#############//



//##############**"Star Wars" **##############//
 int star_note[] = {
 NOTE_C4, NOTE_C4, NOTE_C4, NOTE_GS3, 0, NOTE_DS4, NOTE_C4, NOTE_GS3, 0, NOTE_DS4, NOTE_C4, 0, NOTE_G4, NOTE_G4, NOTE_G4, NOTE_GS4, 0, NOTE_DS4, NOTE_C4, NOTE_GS3, 0, NOTE_DS4, NOTE_C4
};
 int star_duration[] = {
 4,4,4,8,16,16,4,8,16,16,4,4,4,4,4,8,16,16,4,8,16,16,4
};
 //###########End of Star Wars#############//

//##############**"Jingle Bells" **##############//
 int Jingle_note[] = {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_E5, NOTE_E5, NOTE_E5, NOTE_E5,NOTE_E5, NOTE_D5, NOTE_D5, NOTE_E5,
 NOTE_D5, NOTE_G5};

int Jingle_duration[] = {8,8,4,8,8,4,8,8,8,8,2,8,8,8,8,8,8,8,16,16,8,8,8,8,4,4};

//###########End of Jingle Bells#############//

//##############**"End Music" **##############//
 int end_music_note[] = {
 NOTE_C4, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, 0, NOTE_B3, NOTE_C4
 };

// note durations: 4 = quarter note, 8 = eighth note, etc.:
 int end_music_duration[] = {
 4, 8, 8, 4, 4, 4, 4, 4
 };
 //###########End of End Music#############//

//##############**"Begin Music" **##############//
 int begin_music_note[] = {
 NOTE_C4, NOTE_E4, NOTE_G4, NOTE_C5
 };

// note durations: 4 = quarter note, 8 = eighth note, etc.:
 int begin_music_duration[] = {
 4, 4, 4, 4
 };
 //###########End of Begin Music#############//