Impossible to perform two actions at the same time

Hello everyone, I am trying to create an app that receives data via Bluetooth and graphs it in a "ChartData2D". So far so good, the graph works, I can stop it, restart it, do various actions.
Now as the second part I want to implement a form of training, in which I can enter the rest times, contraction and the number of repetitions. Once these 3 data have been entered, I press a start button and I hope that some beeps are heard according to the established times and that the graph continues to work. But that's not the case, the beeps are heard but the app goes into a kind of freeze, which affects the entire screen since during that time nothing works on the screen, not even the graphics or even if I try to raise or lower the phone volume. When the beeps end, the graph is quickly painted with the values ​​it would have if it worked all the time. It's very strange, I don't know if there is any kind of solution or if I'm doing something wrong.
Good morning, I hope for your help.

image of the blocks that do the sounds on the correct time
CTS.aia (345.4 KB)

You can't loop to pause in AI2 .

You need a clock timer coupled to a global list of sounds and durations, or switch to a Player and have it peel off the next sound file from a global list when it finishes the current file.

According to the information you gave me, it is impossible for both things to work at the same time even if I do what you put there, right? It states that only one event can occur at a time, and that if more actions have to be carried out, they will be carried out one after another, but always waiting for the previous one to finish.
If so, thank you for your response :blush:

The AI2 Player component does not lock up the phone like the Sound component does.

Here is a copy of your code with the Sound components replaced with Player components, and the wait procedure defanged.

CTS1.aia (345.1 KB)

I did not add a timing queue.

Here is an example of deadline based timing:

I forgot I also has this Morse code demo, using the Sound component and a Clock Timer to drive the output.