Folks,
Happy new year.. . I'm working on a 10m long keyboard project..
I need some general suggestions on a way to run a simple sequence of commands in order .. eg
command 1: flash all keys in random order for 10 seconds,
command 2: select two sets of 8 keys, assign a sound to them and allow them to be played for 10 seconds,
command 3, 'rotate/ the key assignment so the two sets of selected 8 keys more the the right a random number of spaces, then allow the keys to be played for 10 seconds ,.then repeat this process 5 times..
etc....
command 4: switch to a simple game of keyboard pong for 3 min
go bag to command 1 and repeat until you get a 'stop/ command.
what's key here is:
- it must be easy to modify the order and parameters of the sequence with no changes to the node red floors.. eg.. the input would come as a JSON , array or other structure. That structure would call out predefined actions and their parameters
- the first command must complete before the next one launches..
- ideally I would be able to include in this list the construct "do this action for x seconds: .. or " do this action y times"
- ideally I could either supply fixed arguments to the actions or provide them with random values within ranges.
Again, I'm not asking anyone to engineer this completely for me but I'm looking for a good idea on general structure.. eg... should I do this as a hierarchical JSON ? .. an array of Arrays ? .. Either way.. what would the general control flow be so that each command is executed after the previous one completes.. ?
Any general suggestions much appreciated !
-jc