We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e59260f commit ce85b71Copy full SHA for ce85b71
examples/AmplitudeSerialPlotter/AmplitudeSerialPlotter.ino
@@ -49,8 +49,9 @@ void loop() {
49
if (amplitudeAnalyzer.available()) {
50
// read the new amplitude
51
int amplitude = amplitudeAnalyzer.read();
52
-
53
- // print out the amplititude to the serial monitor
54
- Serial.println(amplitude);
+ //dB relative to full scale
+ int dpFS = 20 * log10(abs(amplitude));
+ // print out the decibel to the serial monitor
55
+ Serial.println(dpFS);
56
}
57
0 commit comments