No, I mean with GPIO. I know the basic configurations of raspberry pi.W. H. Heydt wrote:You can start with this: https://www.raspberrypi.org/documentati ... -config.md
Code: Select all
loop for 3 secs pin on wait 0.0005 secs pin off wait 0.0005 secs
Though this is for RPi Zero it uses the GPIO for audio output:JHZ wrote:Thank you for your reply and the link, it is really useful. Actually I am working on a project of very limited budget in which I can not afford expensive speakers and I have to play music form Pi (quality doesn't matter). I was provided with mini metal speaker (linked in my first post) that I have to connect with GPIO pins. I found something similar here http://frederickvandenbosch.be/?p=1447 but he is using another board that supports pHAT DAC. I am looking for library that can support my speaker to attach with GPIO pins directly.
Once again thank you.
Any reason you can't just wire that speaker to the pi headphone socket? headphones are just small speakers...JHZ wrote: Actually I am working on a project of very limited budget in which I can not afford expensive speakers and I have to play music form Pi
Code: Select all
Thank you for the suggestions, very useful. I was googling from 2 3 days but couldn't even get closer to this. It seems to work with my setup and I dare to do this!For primitive $0 input ...
Otherwise, you can do something strange with the GPIO pin 38 which is the i2s input pin. <ake sure your piezo buzzer generates >> +1.8V and put one of its leads on pin 38 (i2s audio data input) and the other lead on pin 39 (GND). Then all you need to do is configure a dummy sound card which uses the i2s port ... work out how to setup "snd-soc-dummy-dai" to do that. This may be a good start : view ... 7&p=749707
Once you see " snd-soc-dummy-dai <-> " in dmesg, you know it is working and arecord -l should list the dummy card.