I’m not really familiar with this microphone, the pair i have are round ones and one is set for left and the other for right channel. Some arduino tutorial mentions that you can leave Sel disconnected like you have, maybe it just transmits on both channels in this configuration. as far as connection it seems fine, maybe try lowering sampling frequency to 16000? if this stil doesn’t work perhaps if you could try another board?
Thanks for trying.
I've lowered the sampling and I currently have 10 units out in the field exhibiting this behavior.
The watchdog timer does reset and that gets everything working, but it bothers me relying on the Watchdog timer, its sloppy.
I feel the answer is in the I2S.h. but that calls out many other .h files as well.
So, it's slow going.
One more question, are you reading I2S directly in the loop with I2S.read()? I used example in I2S library and managed succesfully break it by adding delay in the loop. There are wrappers in ArduinoLibrary that use I2S class but they all have update method that reads I2S into array independently, maybe the timing is crucial if you use raw I2S.
if I add delay(500) in the loop it breaks completely, if I use millis() and print in the plotter every 500 millisecond but the I2S.read() is not delayed it works, but sometimes it stops too, just like you described. If I use AmplitudeAnalyzer from ArduinoSound library, which has own independent routine for reading I2S it doesnt stop even randomly. This is why I was suprised it happend to you but I never used raw I2S before.
Yeah, that ran all night.
I'm suspecting the SPH0645 returns data differently than that library is expecting.
I've read the SPH0645 is not I2S compliant in timing.
Note to self: Next IOT project don't use SPH0645.
Thanks for the help.
I've been digging more in ArduinoSound library regading I2S because I wanted to separate left and right channel amplitude from stereo mics, so I got to know inner working a bit more. What exactly does your mic do?
The output of ArduinoSound library does not seem to correlate to the volume of yelling I am presenting to the SPH0645. Also the output seems to be filtered maybe smoothed. It does not hang up, I ran it all night long and more. To use the SPH0645 you have to >>14 the data out stream. I suspect somewhere down deep in the code the answer is, I see the library does use I2S.h.