File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
libraries/PDM/examples/PDMSerialPlotter Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 12
12
13
13
// The default Circuit Playground Bluefruit pins
14
14
// data pin, clock pin, power pin (-1 if not used)
15
- PDMClass PDM (33 , 34 , -1 );
15
+ PDMClass PDM (24 , 25 , -1 );
16
16
17
17
// buffer to read samples into, each sample is 16-bits
18
18
short sampleBuffer[256 ];
@@ -41,13 +41,13 @@ void setup() {
41
41
42
42
void loop () {
43
43
// wait for samples to be read
44
- if (samplesRead) {
44
+ PDM. IrqHandler ();
45
45
46
+ if (samplesRead) {
46
47
// print samples to the serial monitor or plotter
47
48
for (int i = 0 ; i < samplesRead; i++) {
48
49
Serial.println (sampleBuffer[i]);
49
50
}
50
-
51
51
// clear the read count
52
52
samplesRead = 0 ;
53
53
}
@@ -62,4 +62,4 @@ void onPDMdata() {
62
62
63
63
// 16-bit, 2 bytes per sample
64
64
samplesRead = bytesAvailable / 2 ;
65
- }
65
+ }
You can’t perform that action at this time.
0 commit comments