Is it possible using the app.EditField.Value with buttons together with arduino

1 回表示 (過去 30 日間)
Kekeletso Mlambo
Kekeletso Mlambo 2022 年 11 月 17 日
コメント済み: Kekeletso Mlambo 2022 年 11 月 21 日
I used a button callback function but I cannot get the text into the field when the button is pressed. This is the code i used:
function UnlockrightdoorButtonPushed(app, event)
value = app.UnlockleftdoorButton.Value;
app.EditField.Value = value;
clear all;
global a;
a = arduino;
while(1)
writeDigitalPin(a,'D53',0)
writeDigitalPin(a,'D8',1)
end
end

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 11 月 17 日
What did you expect to have happen when you asked to clear all ?
  3 件のコメント
Walter Roberson
Walter Roberson 2022 年 11 月 20 日
編集済み: Walter Roberson 2022 年 11 月 20 日
You do not have a drawnow() but you have an infinite loop. The display is not going to update until after the infinite loop is finished. Which it never will until you force the application to close.
Kekeletso Mlambo
Kekeletso Mlambo 2022 年 11 月 21 日
Thank you very much

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

カテゴリ

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