Microphone Library for Pico

September 15, 2021 ยท View on GitHub

Capture audio from a microphone on your Raspberry Pi Pico or any RP2040 based board. ๐ŸŽค

Hardware

Default Pinout

Analog Microphone

Raspberry Pi Pico / RP2040Analog Microphone
3.3VVCC
GNDGND
GPIO 26OUT

PDM Microphone

Raspberry Pi Pico / RP2040PDM Microphone
3.3VVCC
GNDGND
GNDSEL
GPIO 2DAT
GPIO 3CLK

GPIO pins are configurable in examples or API.

Examples

See examples folder.

Cloning

git clone https://github.com/ArmDeveloperEcosystem/microphone-library-for-pico.git 

Building

  1. Set up the Pico C/C++ SDK
  2. Set PICO_SDK_PATH
export PICO_SDK_PATH=/path/to/pico-sdk
  1. Create build dir, run cmake and make:
mkdir build
cd build
cmake .. -DPICO_BOARD=pico
make
  1. Copy example .uf2 to Pico when in BOOT mode.

License

Apache-2.0 License

Acknowledgements

This project was created on behalf of the Arm Software Developers team, follow them on Twitter: @ArmSoftwareDev and YouTube: Arm Software Developers for more resources!

The OpenPDM2PCM library is used to filter raw PDM data into PCM. The TinyUSB library is used in the usb_microphone example.


Disclaimer: This is not an official Arm product.