Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 99761aa

Browse files
Merge pull request #2282 from arduino/benjamindannegard/nano-rp2040-microphone-sketch-fix
[PXCT-214] Fixed RP2040 microphone frequency in tutorial
2 parents ad6f86a + c9b685f commit 99761aa

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‎

Lines changed: 2 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /