How to connect aux out to Raspberrry Pi using Rpi matlab package

30 次查看(过去 30 天)
I need to connect aux as an output for the ANC model while integrating RPi with matlab. The port for aux cable is not available when i run
a = listAudioDevices(r,'capture') on matlab.
  2 个评论
Prasanth Sunkara
Prasanth Sunkara 2024-9-24,5:12
If it is an audio output(plyaback) device, you would have to use the below function to get the list of playback devices
a = listAudioDevices(r,'playback')
Sachin
Sachin 2024-9-24,6:45
Hi Prasanth,
Thank you for the response.
I'm getting the following error when i the command
a = listAudioDevices(r,'playback')
Error using listAudioDevices
Cannot identify
C:\ProgramData\MATLAB\SupportPackages\R2023b\toolbox\realtime\targets\raspi\raspi_examples\listAudioDevices_test.wav.
No such file or directory.

请先登录,再进行评论。

回答(1 个)

Sivsankar
Sivsankar 2024-10-1,11:03
I can see that there is an error in the MATLAB support package directory. I suggest you reinstall the MATLAB Support Package for Raspberry Pi Hardware. You can download this add on from here:
Also make sure that your Raspberry Pi Model falls under the supported hardware for this package.
After that you can initialise the connection between the audio output and Raspberry Pi using the ‘audioplayer’ object and use the ‘play’ function to play audio. You can leverage the following documentation to setup your audio output for your raspberry pi:
Hope these troubleshooting steps solve your query
Thanks.

类别

Help CenterFile Exchange 中查找有关 Simulink Functions 的更多信息

产品


版本

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by