guide GUI button pressed to run an external Arduino program

2 ビュー (過去 30 日間)
Joseph Kutteh
Joseph Kutteh 2021 年 5 月 25 日
編集済み: Joseph Kutteh 2021 年 6 月 1 日
Hello,
I am not sure if this is possible but is there anyway that when i press a button in a matlab guide GUI that then i can run external arduino code in the arduino ide?
Or is there a way to write code in MATLAB that can reset my arduino? I want to reset the arduino without having to press the physical reset button on the arduino board
Thank you
I am using matlab version R2019b
i am using arduino version 1.8.15
i am using an arduino nano

採用された回答

Shubham Khatri
Shubham Khatri 2021 年 6 月 1 日
Hello,
You can reset arduino using a MATLAB code. I am attaching a code snip to do the same. To do this, you need to connect any one pin to the reset pin and add this code to your code.
writeDigitalPin(a, '4', 1); %After connecting pin 4 to reset pin
pause(0.5);
writeDigitalPin(a, '4', 0); %Pulling pin from High to low
pause(0.5);
Apart from this, you can also use the builtin Aurdino function
resetFunc
to reset the Aurdino. You need to define the function and then call it to reset your Aurdino
For more information on working with Aurdino you can look up in this documentation link for
Hope it helps
  1 件のコメント
Joseph Kutteh
Joseph Kutteh 2021 年 6 月 1 日
編集済み: Joseph Kutteh 2021 年 6 月 1 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeArduino Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by