scottlawsonbc / audio-reactive-led-strip

:musical_note: :rainbow: Real-time LED strip music visualization using Python and the ESP8266 or Raspberry Pi
MIT License
2.67k stars 642 forks source link

Change audio source to GPIO input? #319

Open han-so1omon opened 3 years ago

han-so1omon commented 3 years ago

I am using the Raspberry Pi setup. Do you know how to change the audio source from USB to a GPIO pin?

Currently, I am capturing audio from an analog microphone attached to an Arduino, then sending that into a GPIO pin. Alternatively, I could use an ADC to capture the microphone and attach that to the Raspberry Pi.

In any case, I don't know how to setup my input pin as a PCM or ctl device so that it can be used with PyAudio. My alternative solution to this would be to write a little streaming interface with the RPI.GPIO library

joeybab3 commented 3 years ago

I'm not 100% sure that is possible, but I'm not super knowledgeable on the pi. Maybe someone might be able to chime in on this?