For MAX323630FTHR: Plays a WAV file in the SD card. Interfaced through serial port using puTTY or powershell.

Dependencies:   USBMSD_BD SDFileSystem max32630fthr USBDevice

Revision:
3:2ddba0146fd8
Parent:
2:d4f9c8c25fa6
--- a/main.cpp	Fri Jul 26 03:00:19 2019 +0000
+++ b/main.cpp	Sat Nov 09 01:33:17 2019 +0000
@@ -77,11 +77,11 @@
         printf("Please input filename: ");
         char *inputptr = title+4;
         if(!getInput(24,inputptr)) {
-            printf("Filenames cannot be more than 20 characters.\033[A\r\n");
+            printf("Filenames cannot be more than 20 characters.\r\n");
         }
         audio = fopen(title,"r");
         if(audio == NULL) {
-            printf("File not found. Please append filetype at the end of filename.\033[A\r\n");
+            printf("File not found. Please append filetype at the end of filename.\r\n");
             continue;
         }
         break;
@@ -115,14 +115,13 @@
     }
     maxSampleVal/=2;
 
-
     int flag;
     //find start of actual audio
     fseek(audio,44,SEEK_SET);
 
     printf("Size: %i bytes\r\n",Track.size);
 
-    PWM.period_us(10);
+    PWM.period_us(20);
     short size = sizeof(short);
     
     fread((void *)audioDataBuffer,size,HALF_BUFFER,audio);