sharon look here

Revision:
4:b9b10594a4bb
Parent:
3:0b8abee5b733
--- a/src/main.cpp	Sun Nov 24 20:33:31 2019 +0000
+++ b/src/main.cpp	Sun Nov 24 22:00:07 2019 +0000
@@ -44,7 +44,7 @@
 }
 
 void record(float* sampleArr) {
-    int val;
+    float val;
     //record sound for 1 second
     for(int i=0; i<800; i++) {
         val = mic.read();
@@ -64,8 +64,8 @@
     while(1){
         //wait(0.2); 
         //record(sampleArr); 
-        val = mic.read();
-        pc.printf("%f\n",val);
+        val = (int)mic.read_u16();
+        pc.printf("%d\n",val-32768);
         //ptpAmp=findPTPAmp(sampleArr);
     }
 }