I have been trying to make a piezo capsules to play a music for me so I have figured out what Hz sounds like a Do Re Mi Fa So La Ti Do and tried to write a simple melody of Lightly Row (Thank you to my sister Minji who graduated from juilliard and Yale to help me write a song and figuring out which Hz sounds like Do Re Mi).
Code
void setup() {
pinMode(12, OUTPUT);
}
void loop() {
tone(12, 392); //G 솔
delay(500);
tone(12, 330); //E 미
delay(500);
tone(12, 340); //E 미
delay(1000);
tone(12, 349); //F 파
delay(500);
tone(12, 294); //D 레
delay(500);
tone(12, 295); //D 레
delay(1000);
tone(12, 261); //Middle C 도
delay(500);
tone(12, 294); //D 레
delay(500);
tone(12, 330); //E 미
delay(500);
tone(12, 349); //F 파
delay(500);
tone(12, 392); //G 솔
delay(500);
tone(12, 394); //G 솔
delay(500);
tone(12, 396); //G 솔
delay(1000);
tone(12, 294); //D 레
delay(500);
// tone(12, 261); //Middle C 도
// delay(500);
//
// tone(12, 277); //C# 도# / 래b
// delay(500);
//
// tone(12, 294); //D 레
// delay(500);
//
//
// tone(12, 311); //D# 미b
// delay(1000);
//
// tone(12, 330); //E 미
// delay(1000);
//
//
// tone(12, 349); //F 파
// delay(1000);
//
// tone(12, 370); //F# 파#
// delay(1000);
//
// tone(12, 392); //G 솔
// delay(1000);
//
// tone(12, 415); //G# 솔# /라b
// delay(1000);
//
// tone(12, 440); //A 라
// delay(1000);
// put your main code here, to run repeatedly:
}
