Skip to content

Commit c9b685f

Browse files
Fixed frequency in sketch
1 parent 367d260 commit c9b685f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/hardware/03.nano/boards/nano-rp2040-connect/tutorials/rp2040-microphone-basics/rp2040-microphone-basics.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ We will now get to the programming part of this tutorial.
6969
2. We can now take a look at some of the core functions of this sketch:
7070

7171
- `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.
7373
- `short sampleBuffer[512]` - buffer to read samples into, each sample is 16-bits.
7474
- `while (!Serial)` - prevents program from running until Serial Monitor is opened.
7575
- `PDM.begin(channels, frequency)` - initializes the PDM library.
@@ -87,7 +87,7 @@ bool LED_SWITCH = false;
8787
static const char channels = 1;
8888
8989
// default PCM output frequency
90-
static const int frequency = 16000;
90+
static const int frequency = 20000;
9191
9292
// Buffer to read samples into, each sample is 16-bits
9393
short sampleBuffer[512];

0 commit comments

Comments
 (0)