Arduino delay in MATLAB Gui

1 次查看(过去 30 天)
ishani uthpala
ishani uthpala 2021-3-9
I want to turn on air pump when press the push button and it should automatically turn off after 3 seconds. I'm very begginer of MATLAB gui. So kindly request for answer.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global a;
writeDigitalPin(a,'D3',1);
pause(3);
But above code has problem it will never stop after 3 seconds

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Arduino Hardware 的更多信息

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by