File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 2727
2828
2929void setup () {
30-
3130 // Initialize the M5Stack object
3231 M5.begin ();
3332
@@ -39,20 +38,19 @@ void setup() {
3938void 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+ }
You can’t perform that action at this time.
0 commit comments