Timer1's stopFcn to start Timer2
Mostra commenti meno recenti
I'm trying to figure out how i can use timers to control the amount of time between I set a pin HIGH or LOW on an Arduino.
I created 2 timers (each with a start delay of 3 seconds):
tHigh = timer('StartDelay',3);
tLow = timer('StartDelay',3);
And assigned the TimerFcn to set the pin HIGH and LOW:
tHigh.TimerFcn = @(x,y) a.writeDigitalPin(8,1);
tLow.TimerFcn = @(x,y) a.writeDigitalPin(8,0);
When tHigh stop - I want to start tLow:
tHigh.StopFcn = @(x)start(tLow);
My problem is that i get the following error message, when start(tHigh) is called:
Error while evaluating StopFcn for timer
Does anybody have a clue whats wrong?
Thanks in advance :)
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su MATLAB Support Package for Arduino Hardware in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!