필터 지우기
필터 지우기

Checking the timer Running property

조회 수: 22 (최근 30일)
Sallie
Sallie 2018년 11월 8일
답변: Paul Kloker 2019년 7월 2일
Hi all,
I want to check the running status of a timer in my program. The timer is used to turn a digital pin on an arduino pin to turn On and Off at a specific time and then turn it off. I want to perform other task if the timer is running. I used the following code to check the running property of the timer but it reads always ON.
R = get(ledtimer,'Running');
if (R =='on')
fprintf('Timer is running');
end

답변 (1개)

Paul Kloker
Paul Kloker 2019년 7월 2일
Hey Sallie,
just got the same problem. Here is my solution:
R = get(ledtimer, 'Running');
if isequal(R ,'on')
fprintf('Timer is running');
end

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by