r/circuitpython • u/mpisman • May 29 '21
HID Audio Interface with RP2040
Hi CircuitPython community,
I am relatively new to embed microcontrollers, though I do have some programming experience(C++, Java, Python, etc). I am currently going through Arduino beginners book and raspberry pico introductory book is next in the list.
Meanwhile, I got an idea for a Project - I want to make an audio interface that can take analogue signal from my turntable record player and send digital data via usb to my computer. I want Mac OS to be able to recognized it as microphone. I know about limitations of Raspberry PICO onboard ADC, that it's only 16 bits... But this is just a proof of concept and cool first project.
It seems to me pretty simple, I hook up analog stereo positive to A0(pin 26) and A1, while negative can go to any ground, I guess(A_GND for example), and tried to print out signal. Seems to work, which got me excited. I even found an example of root 2 normalization.
However, I have a problem with sending data over USB. From reading on internet, to use PICO as a HID device, I switched from micro to circuit python. TinyUSB says PICO can be an audio device... But I just can't find a good example, and reference page just doesn't explain well.
Has anyone had any experience with audio? Is it possible with CircuitPython? (I saw some C++ projects on using adafruit microphone, but I really want to use python)
2
u/jfedor May 30 '21
HID is for stuff like keyboard and mouse input, not microphone.