We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f14bae4 + e68b0db commit 282ba12Copy full SHA for 282ba12
content/tutorials/generic/I2s-library-examples/I2s-library-examples.md
@@ -150,7 +150,7 @@ const int amplitude = 500; // amplitude of square wave
150
151
const int sampleRate = 8000; // sample rate in Hz
152
153
-const int halfWavelength = (sampleRate / frequency); // half wavelength of square wave
+const int halfWavelength = (sampleRate / frequency) / 2; // half wavelength of square wave
154
155
short sample = amplitude; // current sample value
156
int count = 0;
@@ -192,4 +192,4 @@ void loop() {
192
193
count++;
194
}
195
-```
+```
0 commit comments