gogo

Dependencies:   SDFileSystem mbed

Files at this revision

API Documentation at this revision

Comitter:
csggreen
Date:
Mon Dec 11 12:32:47 2017 +0000
Parent:
3:d629019b51b8
Commit message:
gotit

Changed in this revision

VS1053.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r d629019b51b8 -r 8beb6cba9864 VS1053.lib
--- a/VS1053.lib	Sun Dec 10 07:15:08 2017 +0000
+++ b/VS1053.lib	Mon Dec 11 12:32:47 2017 +0000
@@ -1,1 +1,1 @@
-https://os.mbed.com/teams/SGMP-Coperations/code/VS1053/#94b538ace77a
+https://os.mbed.com/teams/SGMP-Coperations/code/getitmp3/#5b1bd3cca8dc
diff -r d629019b51b8 -r 8beb6cba9864 main.cpp
--- a/main.cpp	Sun Dec 10 07:15:08 2017 +0000
+++ b/main.cpp	Mon Dec 11 12:32:47 2017 +0000
@@ -1,25 +1,36 @@
 #include "mbed.h"
 #include "player.h"
 //https://cdn-shop.adafruit.com/datasheets/vs1053.pdfหน้า19
-Serial aa(D1, D0);
+
 Player player;
 
- 
+void selectfile(char);
 extern char list[20][50];            //song list
 extern playerStatetype  playerState; 
 extern char green; 
+extern bool startplaysong;
+extern bool playsong;
 
 
 
 int main() {
     player.begin(); 
     while(1){
+        playsong = true; 
+        do{
+            
+        player.read();
+        
+        }while(startplaysong);
+        
+            if(playsong){
+                
+                player.run();
+            }
+            
+        player.read();
 
-    player.playFile(list[green]);
-    player.stop();
-    player.playFile(list[green-1]);
-    player.stop();
-    player.playFile(list[green-2]);
+
 
    }
 }
\ No newline at end of file