Hey everyone!
I’ve been using the PDM microphone on the XIAO nRF52840 sense to record audio data. It samples data at a rate of 16 kHz meaning it can process frequencies up to around 8 kHz (has two readings on each wave). My firmware fills an integer buffer of length 32,767 with PCM data, then writes it out to an SD card.
My audio recording application only needs to capture frequencies from 0 kHz up to 2 kHz - 4 kHz. Is it possible to reduce the 16 kHz sample frequency to 4 kHz - 8 kHz to increase time between SD writes to conserve battery life? In my testing, I can change PDM_SAMPLE_RATE to be different from 16000, but it doesn’t record any audio data.
if (!PDM.begin(1, PDM_SAMPLE_RATE)) { // mono 16000 samples/sec
Serial.println("Failed to start PDM!");
}
Thanks in advance!