Grove soundsensor lib

Revision:
4:89a9c205446c
Parent:
3:372e67c123c3
Child:
5:944179f9d11f
--- a/soundsensor.cpp	Fri Jan 18 10:28:28 2019 +0000
+++ b/soundsensor.cpp	Fri Jan 18 10:33:01 2019 +0000
@@ -26,10 +26,9 @@
 
 float soundsensor::listen(bool toDb){
     AnalogIn sensor(this->getPin());
-    float value = sensor.read_u16();
     
     for(int i=0;i<100;i++){
-        values[i] = soundSensor.read_u16();
+       values[i] = sensor.read_u16();
         wait(0.0001);
     }