I have connected some PIC Microcontrollers to my Raspberry pi. They can communicate(send text data) to Raspberry pi through UART. Is there any way to connect microphone to GPIO pins and talk to PIC using that UART?


A microphone is generally an analog device, and the Pi has neither a microphone jack nor an accessible ADC. So there are two ways you could go about this:

  • Get a cheap USB soundcard; these are an inch or so long and have the familiar green "out" and pink "in" (e.g., microphone) 3.5mm stereo jacks. You can then access the PCM input stream through alsalib and do what you want with it. Note that's the native C API in the link, but there will be a python wrapper if that's what you want to use.

  • Get an ADC add-on board (some PIC's also have ADC's) and try and attach a microphone that way. This is probably not much more complex than the previous option (although I'm not sure, since I've never done this one), but it obviously involves more low level, from scratch work implementing the PCM code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.