Grove soundsensor lib
Revision 9:c38836e5d1f5, committed 2019-01-23
- Comitter:
- math991e
- Date:
- Wed Jan 23 11:48:11 2019 +0000
- Parent:
- 8:5b4b258eb1da
- Commit message:
- array fix
Changed in this revision
soundsensor.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 5b4b258eb1da -r c38836e5d1f5 soundsensor.cpp --- a/soundsensor.cpp Wed Jan 23 11:10:07 2019 +0000 +++ b/soundsensor.cpp Wed Jan 23 11:48:11 2019 +0000 @@ -73,7 +73,7 @@ */ float soundsensor::listen(bool toDb){ AnalogIn sensor(this->getPin()); - int values[] = {}; + int values[100 + 1]; float sum; float average;