I would like to use the acoustic sensor to work out a frequency signature of audio. I had a look at API : https://developer.bosch.com/web/xdk/acoustic#6
But I am very confused with the c full code example. To work out FFT, in the example you are using a FreeRtos timer with a period of 100ms (freq=10Hz) to sample audio and from 32 samples workout the frequency response. Knowing that sampling frequency must be at least 5 times higher than the freq of signal to measure, it means that you can’t measure audio signal above 2Hz ! Even if you increase sampling freq to 1KHz, which seem to be the maximum possible if you use FreeRtos timer; you can only measure signal lower than 200Hz !!! Far from covering audio frequency range.
Same for data acquisition, you are working out an Rms value from 256 samples at a frequency of 22050Hz, that is you need ~11ms to get a unique sample !
I may misunderstand something.
Solved! Go to Solution.
I have patched reference code for my own application. But don’t trust the piece of code given in https://developer.bosch.com/web/xdk/acoustic#6 it is simply not doing what it is meant to do.
Thanks for the update Denis, and if you know the error in the documentation and are willing to comment, we would always value being able to report that for improvement also!