Hi Again. On a Basic Atom Pro 28, I could easily do this by setting up a timer with an interrupt that toggles the pin. But I don't know if that is available on the BS2. I rather doubt it.
So another approach would be to break up the code into a loop that loops sleeping by the minimum time each step takes and do something at the appropriate time in the loop.
I am not at all proud of this quick and real dirty approach. Note: I did not try this at all and my timings may be slightly off, but maybe something like:
cnt VAR Word
FOR cnt = 0 TO (5 + 1 +650+3+650)
IF cnt = 5 THEN
ELSEIF cnt = 6 THEN
ELSEIF cnt = (6+650) THEN
ELSEIF cnt = (6+650+3)THEN
IF cnt // 5 = 0 THEN
TOGGLE 13 ' this assumes that pin 13 is new pin for LED...
I would be much happier with the code if I built a table with a time value and an indicator of what to do, but...
I hope this helps