@@ -38,30 +38,30 @@ void setup()
3838 display.display (); // Put clear image on display
3939
4040 // Init the buzzer, this must be called if using it
41- display.buzzer . begin ();
41+ display.initBuzzer ();
4242
4343 // The most basic example
4444 // This will produce three short beeps
4545 // The beeps are each 80ms long
46- display.buzzer . beep (80 );
46+ display.beep (80 );
4747 delay (80 );
48- display.buzzer . beep (80 );
48+ display.beep (80 );
4949 delay (80 );
50- display.buzzer . beep (80 );
50+ display.beep (80 );
5151 delay (80 );
5252
5353 delay (5000 ); // Wait 5 seconds before the next example
5454
5555 // The buzzer may also be controlled by manually turning it on or off
5656 // beepOn will turn on the buzzer indefinitely until beepOff is called
5757 // This will produce two 200 ms beeps
58- display.buzzer . beepOn ();
58+ display.beepOn ();
5959 delay (200 );
60- display.buzzer . beepOff ();
60+ display.beepOff ();
6161 delay (200 );
62- display.buzzer . beepOn ();
62+ display.beepOn ();
6363 delay (200 );
64- display.buzzer . beepOff ();
64+ display.beepOff ();
6565 delay (200 );
6666
6767 delay (5000 ); // Wait 5 seconds before the next example
@@ -70,13 +70,13 @@ void setup()
7070 // Note that pitch is approximated as the digital potentiometer does not affect the pitch in a linear way
7171 // Frequencies from 572 to 2933 Hz are supported
7272 // Here are two low pitched (~750Hz) followed by two high pitched (~2400Hz) beeps
73- display.buzzer . beep (300 , 750 );
73+ display.beep (300 , 750 );
7474 delay (50 );
75- display.buzzer . beep (300 , 750 );
75+ display.beep (300 , 750 );
7676 delay (50 );
77- display.buzzer . beep (300 , 2400 );
77+ display.beep (300 , 2400 );
7878 delay (50 );
79- display.buzzer . beep (300 , 2400 );
79+ display.beep (300 , 2400 );
8080 delay (50 );
8181
8282 delay (5000 ); // Wait 5 seconds before the next example
@@ -89,16 +89,16 @@ void loop()
8989 if (repeatCounter < 2 )
9090 {
9191 // Play the note set to be played for 100 ms
92- display.buzzer . beep (100 , chord[currentNoteIndex]);
92+ display.beep (100 , chord[currentNoteIndex]);
9393 delay (600 ); // Wait 600 ms so there's room between the notes
9494 }
9595 // The second four times play the notes twice
9696 else
9797 {
9898 // Play the note set to be played for 100 ms
99- display.buzzer . beep (100 , chord[currentNoteIndex]);
99+ display.beep (100 , chord[currentNoteIndex]);
100100 delay (250 ); // Wait 300 ms and play it again for 50 ms
101- display.buzzer . beep (50 , chord[currentNoteIndex]);
101+ display.beep (50 , chord[currentNoteIndex]);
102102 delay (300 ); // Wait for 300 ms, this totals to 700 so it's in rhythm
103103 }
104104
0 commit comments