You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/hardware/03.nano/boards/nano-rp2040-connect/tutorials/rp2040-microphone-basics/rp2040-microphone-basics.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ We will now get to the programming part of this tutorial.
69
69
2. We can now take a look at some of the core functions of this sketch:
70
70
71
71
-`static const char channels = 1;` - sets the number of output channels.
72
-
-`static const int frequency = 16000;` - sets the sampling frequency to 20 KHz.
72
+
-`static const int frequency = 20000;` - sets the sampling frequency to 20 KHz.
73
73
-`short sampleBuffer[512]` - buffer to read samples into, each sample is 16-bits.
74
74
-`while (!Serial)` - prevents program from running until Serial Monitor is opened.
75
75
-`PDM.begin(channels, frequency)` - initializes the PDM library.
@@ -87,7 +87,7 @@ bool LED_SWITCH = false;
87
87
static const char channels = 1;
88
88
89
89
// default PCM output frequency
90
-
static const int frequency = 16000;
90
+
static const int frequency = 20000;
91
91
92
92
// Buffer to read samples into, each sample is 16-bits
0 commit comments