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

조회 수: 2 (최근 30일)
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.

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

카테고리

Help CenterFile Exchange에서 Arduino Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by