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 1212
1313// The default Circuit Playground Bluefruit pins
1414// data pin, clock pin, power pin (-1 if not used)
15- PDMClass PDM (33 , 34 , -1 );
15+ PDMClass PDM (24 , 25 , -1 );
1616
1717// buffer to read samples into, each sample is 16-bits
1818short sampleBuffer[256 ];
@@ -41,13 +41,13 @@ void setup() {
4141
4242void loop () {
4343 // wait for samples to be read
44- if (samplesRead) {
44+ PDM. IrqHandler ();
4545
46+ if (samplesRead) {
4647 // print samples to the serial monitor or plotter
4748 for (int i = 0 ; i < samplesRead; i++) {
4849 Serial.println (sampleBuffer[i]);
4950 }
50-
5151 // clear the read count
5252 samplesRead = 0 ;
5353 }
@@ -62,4 +62,4 @@ void onPDMdata() {
6262
6363 // 16-bit, 2 bytes per sample
6464 samplesRead = bytesAvailable / 2 ;
65- }
65+ }
You can’t perform that action at this time.
0 commit comments