Has anybody used a I2S Microphone with the Photon?
I saw this awesome board on Tindie and was wondering if somebody has already used the I2S library in a Photon. There are some examples on this Github written for Teensy.
The board uses InvenSense ICS-43432 MEMS microphone (it is a newer version of the popular INMP441).
We haven’t. But is should be very easy to do using the examples on the github repository. The million dollar question is how to port that library to Particle
Looks interesting. I ordered two; will give it a shot when they arrive. The Photon datasheet lists I2S support though I don’t see a mention of it in the software docs. How hard could it be to implement? LOL
Sorry for the delayed response — I just returned from parental leave.
Sounds like an amazing project! Good luck! My best first tip is to carefully and thoroughly read section 25.4 of the STM32F205 Reference Manual about the I2S peripheral. Make sure you fully understand the capabilities and expectations of both the STM32F205 and the ICS-43432. I2S has a bunch of different standards, so getting the devices talking in the first place will probably take some work.
We don’t have an I2S library built into the firmware, but if you can get this working, that’s a big step toward such a library. I2S shares interrupts and other functionality with SPI, so you might be able to reuse some code there. The entrance to that rabbit hole is our SPI class.
The Photon pin-out diagrams show WS, SCK, and SD on pins D5, D4, and D2 respectively. If you need the MCK line for an audio sampling rate, you’ll have to solder to the pad directly under the setup button, documented as Photon pin 26 in the PCB land pattern and be aware that that is the same pin that the setup button is on.
I hate to bump semi-old threads, but I would love to hear if any of you had luck working out I2S for either Photon or Electron? Or can point me in the right direction, I’m thinking of porting the Arduino I2S library, but that is based on SAMD. I’ll update if I have any luck getting it to work.
@janek Unfortunately we ditched the idea due to lack of available libraries and we wanted a quick solution, this was some months ago though so maybe there is something available now. Unfortunately I cannot help you.