-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add I2S input (microphones, etc.) #99
Comments
Thanks for the note. I actually have a couple of them from my ESP8266 work. Unfortunately the PIO program needs to be rewritten to support I2S input. It's in the queue but not very high priority. If someone has something to contribute to add it sooner, that would be great. |
Hi, This module by @kilograham in the official pico-extras repo also supports output only: The most complete support for I2S in/out that I've found is this MicroPython library by @miketeachman: From there I've extracted the parts i needed (I2S input, blocking) and wrapped it in a Arduino-Pico-like library: Now, it would be great to have support directly in the standard pico SDK or at least in the pico-extras. @miketeachman, @kilograham, @earlephilhower what do you think? Shall we work on it? All the best, |
Nice work, @giampiero7. This core now just uses the pico-extras I2S code with a thin You might want to consider doing a PR against pico-extras w/an addition. I'm not sure about the licenses (MIT vs. BSD-3), though. -edit- D'oh! It's too early for me. I see you've already started the PR over in pico-extras! Good luck! |
Glad you can use the MicroPython implementation to get better I2S support in the Arduino rp2 implementation. I don't see any licensing problems.. You'll just need to keep the MIT licensing comment as you have used "substantial portions of the Software" as outlined in the MIT license. I'll keep an eye out for any significant improvements or bugs you find. I will be adding MCK support to the MicroPython rp2 port at some point, similar to this PR-I2S on mimxrt port . |
Hi @miketeachman, BTW, I'm running some tests and noticing some strange data coming from my mic... I'll be bothering you with an issue on your repo tomorrow probably... |
@giampiero7 I really like your idea of a shared I2S codebase, but I'm not sure that pico-extras is the best place. The code in pico-extras is somewhat experimental as highlighted by the warning "Note that any API here is a work in progress and subject to change". Perhaps consider adding I2S support to the Pico SDK, e.g. pico-sdk/tree/master/src/rp2_common/hardware_i2s. A challenge for my involvement is that I don't have any time to work on this initiative. Any volunteer development time goes towards MicroPython. Sorry.
Great. I like to know about any problems. It would help me to have a minimal code example that can reliably reproduce the issue, ideally written in MicroPython as I rarely work in the Arduino environment. Here is a blocking example in MicroPython Thanks! |
@miketeachman I just thought pico-extras would be a good test area, to be later promoted to the SDK once the API is finalized.
Well, being it a common codebase, it would still be a contribution to MicroPython after all ;P Anyway, I'll go on with the tests and then I'll find a way to persuade you :) |
Rewrite the I2S code from scratch to eliminate the dependence on the pico-extras implementation and to support I2S input as well. 8-bit, 16-bit, 24-bit, and 32-bit words are supported. Multiple I2S ports are allowed (theoretically up to 6 because 2 DMA channels are required per port). I2S input and I2S output are supported. Add input example Fixes #535 Fixes #99 Fixes #562
Good to see the I2S output happening...
FYI
The Microcenter Stores cleared out the original Google Voice Kits for $2.99, if you know anyone with one, the I2S mic. (SPH0645LM4H-B) pair connector is:
Blk Gnd
Grn I2S DIN
Wht I2S BCLK
Blu I2S LRCLK
Red 3.3V
The text was updated successfully, but these errors were encountered: