Speaker Code

Dependencies:   SDFileSystem mbed wave_player

Files at this revision

API Documentation at this revision

Comitter:
emanuel22e
Date:
Mon Dec 05 00:06:03 2022 +0000
Parent:
2:f04e2e446c74
Commit message:
update speaker code

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r f04e2e446c74 -r 8ebd761c0483 main.cpp
--- a/main.cpp	Sun Dec 04 23:53:51 2022 +0000
+++ b/main.cpp	Mon Dec 05 00:06:03 2022 +0000
@@ -4,7 +4,7 @@
 SDFileSystem sd(p5, p6, p7, p8, "sd"); // the pinout on the mbed Cool Components workshop board
 AnalogOut speaker(p26); 
 wave_player waver(&speaker);
-int main() {
+void shaking_sound() {
     FILE *wave_file;
     //open wav file and play it
     wave_file=fopen("/sd/thread_sound.wav","r");
@@ -13,3 +13,6 @@
     //end of program
     wait(.2);
 }
+int main() {
+    while(1)
+}