Skip to content

Commit 6c13278

Browse files
authored
Merge pull request #47 from joeybab3/patch-1
Spelling, better comments on speaker example
2 parents c6b9e11 + f660b1a commit 6c13278

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

examples/Basics/Speaker/Speaker.ino

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828

2929
void setup() {
30-
3130
// Initialize the M5Stack object
3231
M5.begin();
3332

@@ -39,20 +38,19 @@ void setup() {
3938
void loop() {
4039
if(M5.BtnA.wasPressed()) {
4140
M5.Lcd.printf("wasPressed A \r\n");
42-
M5.Speaker.beep();
41+
M5.Speaker.beep(); //beep
4342
}
4443

4544
if(M5.BtnB.wasPressed())
4645
{
4746
M5.Lcd.printf("wasPressed B \r\n");
48-
M5.Speaker.tone(3000, 200); //frequency 3000, durtion 200ms
47+
M5.Speaker.tone(3000, 200); //frequency 3000, with a duration of 200ms
4948
}
5049

5150
if(M5.BtnC.wasPressed())
5251
{
5352
M5.Lcd.printf("wasPressed C \r\n");
54-
M5.Speaker.playMusic(m5stack_startup_music, 25000);
53+
M5.Speaker.playMusic(m5stack_startup_music, 25000); //play the M5Stack startup sound
5554
}
56-
5755
M5.update();
58-
}
56+
}

0 commit comments

Comments
 (0)