Speaker / sound output to gpio
I am currently building a small ROS powered robot with the upboard 4/32 as the main brain. I need to sound out and am very limited for space meaning USB and BT speakers are both to large. Ideally I would use a micro metal speaker directly attached to GPIO. I have this working on the current Pi CPU (even tinnier than you would think, but perfect for purpose) Any one able to give me pointers on the for the Up
Many thanks
Bar Foo
Best Answers
-
Hi TooBarFoo,
Depending on your requirements, there may be a few options left even without USB/BT. PWM audio could be an option for basic sound - see https://wiki.up-community.org/Pinout#PWM for PWM testing steps.
In the off chance you already plan to use a HDMI display, audio works over HDMI too.
Finally, I2S from the SoC is connected to the GPIO header as well, but unfortunately not enabled on our supported kernels.
If you go a different route, may I ask you to leave a few lines in the wiki:
https://wiki.up-community.org/AudioThanks!
-
Thanks for the response and sorry for the delay in responding, have been tied up with other projects and just getting back to this. HDMI is probably out as i'd need to fashion a decoder to brake out audio and again space is a problem. I will look into I2S as this would be the perfect solution so i'll see what I can do running ubuntu. If that fails I will make small usb speaker board and solder direct to the current points, should be able to keep it very small footprint. If I come up with anything of interest i will be sure to share.
tbf