How to generate sound with different frequency in a buzzer using Arduino Simulink?
조회 수: 25 (최근 30일)
이전 댓글 표시
I am working on a project, where I am supposed generate sounds of different frequency. I am using Arduino and Simulink support package. But I dont find anything related to generating different frequency sounds in simulink support package. I am aware of Playtone function in Matlab. Can we use this as a Matlab function in Simulink?
Or are there any other methods to generate sounds of different frequency in Simulink Arduino?
답변 (1개)
Kshitij Chhabra
2020년 6월 18일
Hi Sanjeev,
From my understanding of your question you want to generate sounds of different frequencies and want to send them as signals for the Arduino Support Packages in Simulink. As you mentioned you may use the playtone function available in MATLAB as a Function block in Simulink. Alternatively, I would recommend you using Audio Oscillator component from the Audio Toolbox available in Simulink.
Once added in the workspace, after double clicking on it you can specify the type of signal, frequency and the amplitude along with the Samples per frame and the Sample Rate in Hz which you’d require to produce.
댓글 수: 2
Michael Goebel
2020년 6월 18일
i want to add a question to this question:
from my understanding, the playtone function does not work on the arduino standalone.
how can i play that generated tone in standalone mode on the arduino?
in arduino ide exists a command tone(pin, frequency, duration)
Huy
2023년 11월 25일
I have a similar question, but the developer seems to have ignored these questions
참고 항목
카테고리
Help Center 및 File Exchange에서 Arduino Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!