Repeating sequence of bus commands

Hi, I realized that the frequency generation command doesn’t support bigger intervals, so I decided to use the bus commands in DIO mode as follows:

“>A.1 D:1000 a.1 D:1000”

to toggle IO1 in loops of 2 seconds.

However, I notice that while there’s a repeat command, I can’t do this for multiple commands in a sequence like this. I’d like to repeat this, for example 100 times, without me having to press UP+ENTER repeatedly.

Is there some functionality for this, that I missed?

If it’s not possible, I might look into the BPIO2 interface, though it feels a bit overkill for quick testing/iteration.

1 Like

A quick hack is to paste it 100 times in a script, you can even assign that to the button if it makes things easier.

There is currently no way to meta repeat commands though.

Another tact would be to re-implement the freq gen in PIO, which someone has already done the heavy lifting on, to give us much larger intervals.

Thanks for the swift answer!

While reimplementing the freq gen in PIO might be useful, this is one of those cases where I don’t really need high precision (I don’t think anyone needs high precision at these speeds :P), and I think the bus syntax would be much more versatile if it supported some kind of “repeat this section N times” syntax. Can I make this a feature request?

Anyway, for now I’ll just try the buttoned solution. Thanks!

1 Like

Glad it helps.

Would you have a suggested syntax for meta repeat?

( [0x10 0x50]):100

Just off the top of my head.