Professional Documents
Culture Documents
c 16.35 Hz
d 18.35 Hz
e 20.60 Hz
f 21.83 Hz
g 24.50 Hz
a 27.50 Hz
b 30.87 Hz
C 16.35 Hz
char notes[] = "ggddeed ccbbaag ddccbba ddccbba ggddeed ccbbaag "; // a space represents a
rest
int beats[] =
{1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,2,1};
void setup()
{
pinMode(buzzerPin, OUTPUT);
lcd.begin(16, 2);
lcd.clear();
lcd.print("Twinkle twinkle");
}
void loop()
{
int i, duration;
int i;
const int numNotes = 8; // number of notes we're storing
char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
int frequencies[] = {523, 587, 660, 349, 392, 440, 494, 523};