I am implementing a very basic simple countdown counter which counts from 10 to 0 with counting down by one value after 1 second.
Now, I have a state machine in which I have a state CountDownState for counting down.
One way of counting down is enter this CountDownState again and again using tm(1000) trigger and everytime reduce the value by one. But I dont want to enter this state again and again.
I just want to enter it once and in the "Reactions in State" part, I wish to have a delay of 1 second and print the value till my value reaches 0.
Is there any delay function for this?
I wish to do something like this: In state CountDownState; in Reactions in State
while(myVal != 0)
//HERE COMES THE COMMAND FOR 1 SECOND DELAY. ANY IDEA WHAT THE COMMAND IS??