Borrar filtros
Borrar filtros

Checking the timer Running property

22 visualizaciones (últimos 30 días)
Sallie
Sallie el 8 de Nov. de 2018
Respondida: Paul Kloker el 2 de Jul. de 2019
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

Respuestas (1)

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

Categorías

Más información sobre MATLAB Support Package for Arduino Hardware en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by