amc2021:groupl:code:sound_detection
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| amc2021:groupl:code:sound_detection [2021/09/06 17:32] – kshama001 | amc2021:groupl:code:sound_detection [2021/09/06 17:34] (current) – kshama001 | ||
|---|---|---|---|
| Line 40: | Line 40: | ||
| sampleBufferValue++; | sampleBufferValue++; | ||
| } | } | ||
| - | if (millisElapsed > SAMPLE_TIME) { //if the elapsed time surpasses the sampling time, print the sampleBufferValue and test threshold for alarm | + | if (millisElapsed > SAMPLE_TIME) { //if the elapsed time surpasses the sampling time, |
| + | //print the sampleBufferValue and test threshold for alarm | ||
| - | dB = 0.0666 *(sampleBufferValue) + 30.223; //linear regression to calculate the decibel value based of the rough calibration of the sensor response | + | dB = 0.0666 *(sampleBufferValue) + 30.223; //linear regression to calculate the decibel value based of |
| + | //the rough calibration of the sensor response | ||
| Serial.println(dB); | Serial.println(dB); | ||
| Serial.print(" | Serial.print(" | ||
amc2021/groupl/code/sound_detection.1630942331.txt.gz · Last modified: 2021/09/06 17:32 by kshama001