You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have set a sample code to record audio signal. One device is with my partner in USA and other is with me in India. Both device are M5 Core 2. We both get different Zero line for output. Our code is 100% same as same firmware is built and flash by me.
This is in Loop of 2 milliseconds to record audio. (Sample rate 500Hz)
esp_err_t result = i2s_read(I2S_PORT, i2sData, 16, &bytesRead, 10);
if (result == ESP_OK && bytesRead >= 16)
{
for (int i = 0; i < bytesRead / 2; i += 2)
{
soundAvg += (i2sData[i] + i2sData[i + 1]) / 2;
}
soundAvg = soundAvg / 8;
AvgSound = soundAvg;
}
If my settings are incorrect. Can you please let me know what should be the optimum setting to record at 500Hz, we are capturing industrial noise along with vibrations being recorded in same loop from MPU6886.
The text was updated successfully, but these errors were encountered:
I think the problem is that the microphone is terrible and that every one is different. Mine has a huge DC offset which then settles after a moment and it looks like they all do and they all start at a different value. For frequency analysis though, provided you get clear of the initial spike you can remove the DC value and the frequency will analysis will still be valid. If you got a better result somehow let me know.
I've also noted a significant DC offset with my device. I solved it by averaging the samples and removing the average. Seems to work pretty well: 22b7b0f
I have set a sample code to record audio signal. One device is with my partner in USA and other is with me in India. Both device are M5 Core 2. We both get different Zero line for output. Our code is 100% same as same firmware is built and flash by me.
My Partner's output
My output
My I2S setting to record audio
This is in Loop of 2 milliseconds to record audio. (Sample rate 500Hz)
If my settings are incorrect. Can you please let me know what should be the optimum setting to record at 500Hz, we are capturing industrial noise along with vibrations being recorded in same loop from MPU6886.
The text was updated successfully, but these errors were encountered: