micropython / micropython-lib

Core Python libraries ported to MicroPython
Other
2.39k stars 994 forks source link

Audio from a microphone #819

Closed ebolisa closed 1 month ago

ebolisa commented 7 months ago

Hi, does anyone know how to interface the ZTS6531S smt microphone? I it got working with Circuitpy but, I want to use mpython instead. Any help is appreciated.

jonnor commented 5 months ago

ZTS6531S is a digital microphone with PDM output. Support for PDM will vary based on platform/microcontroller. Which chip are you using?

For ESP32, there is a MR for adding support in https://github.com/micropython/micropython/pull/14176

ebolisa commented 5 months ago

ZTS6531S is a digital microphone with PDM output. Support for PDM will vary based on platform/microcontroller. Which chip are you using?

For ESP32, there is a MR for adding support in micropython/micropython#14176

It's the one which comes with this board https://52pi.com/products/deskpi-picomate-for-raspberry-pi-pico-pico-w?variant=42514429345944. As mentioned before, the microphone module works with the library which comes with CircuitPython OS. Will look into that MR. Thank you much!

jonnor commented 5 months ago

That board is for the Raspberry PI Pico / RP2040, not ESP32. There is at the moment no PDM support for RP2040 in MicroPython. There was a MR here with some working code, but it has not been integrated. https://github.com/micropython/micropython/pull/8016

ebolisa commented 5 months ago

That board is for the Raspberry PI Pico / RP2040, not ESP32. There is at the moment no PDM support for RP2040 in MicroPython. There was a MR here with some working code, but it has not been integrated. micropython/micropython#8016

Got you, thank you!

projectgus commented 1 month ago

Closing in favour of the linked PR. Once PDM support is enabled then it should be possible to make this microphone work.