How can i interact with embedded hardware through com port in app designer

조회 수: 3 (최근 30일)
Kulbir
Kulbir 2023년 4월 20일
답변: Rijuta 2023년 5월 18일
PLEASE HELP ME HOW TO read save and plot real time adui signal in app designer.. i need to make a gui
  댓글 수: 2
dpb
dpb 2023년 4월 21일
Learn how to control the device from the command line first to send/recieve data from the device. Then wrap that code in the GUI. They're two totally separate things, really...
Kulbir
Kulbir 2023년 5월 3일
hi @dpb
i can communicate with the device in command line. not able to plot live data in graph.

댓글을 달려면 로그인하십시오.

답변 (1개)

Rijuta
Rijuta 2023년 5월 18일
Hi Kulbir,
I understand that you want to read, save, and plot real-time audio signals in MATLAB App Designer. Please follow the steps below:
  1. Start by designing your GUI in MATLAB's App Designer. You can refer the documentation.
  2. In the App Designer, create a callback function for the "Start" button. Inside the callback function, use the ‘audioDeviceReader’ function from the Audio System Toolbox to configure the audio device and start reading audio data.
  3. Add a "Stop" button to your GUI, along with its corresponding callback function. Inside the "Stop" button callback, stop the audio device to halt the data acquisition.
  4. If you want to save the acquired audio data, you can modify the code to write the data to a file using MATLAB's 'udiowrite'function. Create a file writer object and write the audio data inside the while loop.
  5. To update the GUI during real-time data acquisition, use the 'drawnow'function inside the while loop to ensure the GUI components are refreshed.
I hope this solves your query.

카테고리

Help CenterFile Exchange에서 Multichannel Audio Input and Output에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by