// Turn on the buzzer at note A3
//Turn LED Blue on (red/green LOW)
// Wait t*2
// Turn off the buzzer.
// Wait 70 miliseconds
// Turn on the buzzer at note A3.
//Turn LED Red on (blue/green LOW)
// Wait t*2
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note Fs3 (s is sharp)
//Turn LED Green on (red/blue LOW)
// Wait t/4
// Turn off the buzzer.
// Wait t/4
// Turn on the buzzer at note g3.
//Turn LED White on (All HIGH)
// Wait t/4
//Turn off the buzzer.
//Wait t/4
// Turn on the buzzer at note a3
//Turn LED Cyan on (Red LOW)
// Wait t/4
// Turn off the buzzer.
// Wait 400 miliseconds
// Turn on the buzzer at note b3.
//Turn LED Green on (Blue/red LOW)
// Wait t/2
// Turn on the buzzer at note a3
//Turn LED White on (All HIGH)
// Wait t/4
// Turn off the buzzer.
// Wait t/4.
// Turn on the buzzer at note g3.
//Turn LED Magenta on (Green LOW)
// Wait t/4.
// Turn on the buzzer at note fs3.
//Turn LED yellow on (blue LOW)
// Wait t/4
// Turn on the buzzer at note e3.
//Turn LED red on (green/blue LOW)
// Wait t/2
//Turn off the buzzer.
//Wait 400 miliseconds
// Turn on the buzzer at note d3.
//Turn LED blue on (green/red LOW)
// Wait t/2
// Turn on the buzzer at note e3.
//Turn LED White on (All HIGH)
// Wait t/4
//Turn off the buzzer.
//Wait t/4
// Turn on the buzzer at note fs3.
//Turn LED Green on (blue/red LOW)
// Wait t/4
// Turn on the buzzer at note g3.
//Turn LED Red on (blue/green LOW)
// Wait t/4
// Turn on the buzzer at note a3.
//Turn LED Blue on (green/red LOW)
// Wait t/4
// Turn on the buzzer at note b3.
//Turn LED White on (green/red LOW)
// Wait t/4
// Turn on the buzzer at note c4.
//Turn LED Magenta on
// Wait t/2
// Turn on the buzzer at note d4.
//Turn LED white on
// Wait t/4
// Turn on the buzzer at note e4.
//Turn LED cyan on
// Wait t/4
// Turn on the buzzer at note d4.
//Turn LED yellow on
// Wait t/4
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note b3.
//Turn LED Magenta on
// Wait t/4
// Turn on the buzzer at note a3.
//Turn LED blue on
// Wait t/4
// Turn on the buzzer at note g3.
//Turn LED red on
// Wait t/2
//Turn off the buzzer.
//Wait 400 miliseconds
// Turn on the buzzer at note d4.
//Turn LED green on
// Wait t/2
//Turn off the buzzer.
//Wait 20 miliseconds
// Turn on the buzzer at note d4.
//Turn LED white on
// Wait t/2
// Turn on the buzzer at note d4.
//Turn LED yellow on
// Wait t/2
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note d3.
//Turn LED Magenta on
// Wait t/4
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note d3.
//Turn LED cyan on
// Wait t/4
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note d3.
//Turn LED red on
// Wait t/4
// Turn on the buzzer at note d3.
//Turn LED blue on
// Wait t/4
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note d3.
//Turn LED yellow on
// Wait t/4
// Turn on the buzzer at note d3.
//Turn LED cyan on
// Wait t/4
// Turn on the buzzer at note d4.
//Turn LED white on
// Wait t/4
//Turn off the buzzer.
//Wait 70
// Turn on the buzzer at note d4.
//Turn LED red on
// Wait t/4
// Turn on the buzzer at note d4.
//Turn LED blue on
// Wait t/4
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note d3.
//Turn LED white on
// Wait t/4
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note d3.
//Turn LED Magenta on
// Wait t/4
//Turn off the buzzer.
//Wait 70 miliseconds
// Turn on the buzzer at note d3.
//Turn LED Magenta on
// Wait t/4
// Turn on the buzzer at note d3.
//Turn LED yellow on
// Wait t/4
// Turn on the buzzer at note d3.
//Turn LED Magenta on
// Wait t/4
//Turn LED off (All LOW)
//Turn buzzer off
int buzz=3; //buzz is my buzzer, connected to pin 3
int R=0; //R= no sound (rest)
int t=1000; //t is my block of time
int a3=110; //this is my number value for pitch a3
int b3=247; //this is my number value for pitch b3
int c3=131; //this is my number value for pitch c3
int c4=262; //this is my number value for pitch c4
int d3=147; //this is my number value for pitch d3
int d4=294; //this is my number value for pitch d4
int e3=165; //this is my number value for pitch e3
int e4=330; //this is my number value for pitch e4
int fs3=185; //this is my number value for pitch fs3 (s=sharp)
int g3=196; //this is my number value for pitch g3
int BLUE_LED = 10;
int GREEN_LED = 11;
int RED_LED = 9;
void setup()
{
pinMode(BLUE_LED, OUTPUT);
pinMode(GREEN_LED, OUTPUT);
pinMode(RED_LED, OUTPUT);
pinMode(3, OUTPUT);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, LOW);
tone(buzz, a3);
delay(t*2);
tone(buzz, R);
delay(70);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, a3);
delay(t*2);
tone(buzz, R);
delay(70);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, fs3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, g3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, a3);
delay(t/4);
tone(buzz, R);
delay(400);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, b3);
delay(t/2);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, a3);
delay(t/4);
tone(buzz, R);
delay(70);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, g3);
delay(t/4);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, fs3);
delay(t/4);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, e3);
delay(t/2);
tone(buzz, R);
delay(400);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, LOW);
tone(buzz, d3);
delay(t/2);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, e3);
delay(t/4);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, fs3);
delay(t/4);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, g3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, LOW);
tone(buzz, a3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, LOW);
tone(buzz, b3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, c4);
delay(t/2);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, d4);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, e4);
delay(t/4);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, d4);
delay(t/4);
tone(buzz,R);
delay(20);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, b3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, LOW);
tone(buzz, a3);
delay(t/4);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, g3);
delay(t/2);
tone(buzz,R);
delay(400);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, d4);
delay(t/2);
tone(buzz,R);
delay(10);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, d4);
delay(t/2);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, d4);
delay(t/2);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, d3);
delay(t/4);
tone(buzz,R);
delay(10);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, d3);
delay(t/4);
tone(buzz,R);
delay(10);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, d3);
delay(t/2);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, LOW);
tone(buzz, d3);
delay(t/4);
tone(buzz,R);
delay(10);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, d3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, d3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, d4);
delay(t/4);
tone(buzz,R);
delay(70);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, d4);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, LOW);
tone(buzz, d4);
delay(t/4);
tone(buzz,R);
delay(20);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, d3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, d3);
delay(t/4);
tone(buzz,R);
delay(10);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, LOW);
tone(buzz, d3);
delay(t/8);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, HIGH);
digitalWrite(RED_LED, HIGH);
tone(buzz, d3);
delay(t/4);
digitalWrite(BLUE_LED, HIGH);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, HIGH);
tone(buzz, d3);
delay(t/2);
digitalWrite(BLUE_LED, LOW);
digitalWrite(GREEN_LED, LOW);
digitalWrite(RED_LED, LOW);
noTone(buzz);
}
void loop() {
}