How can I build an array not knowing final size at startup?
There is an algorithm that I can think of right now but you would have
to customize it to what you need:
Build a WHILE loop on the outside. Inside this WHILE loop, put a FOR
loop. The FOR loop will take 5 for the number of times it has run or
if the number is less than 5, have it send the number out.
The WHILE loop will continue to run if the ARRAY SIZE is >5. After the
program has sent the 5 data, it would subtract it from the number read
from ARRAY SIZE. I am thinking that you would use a Shift Register
I am not quite sure I understand how your timing works but if you want
to do it fast, you send more data. Does your application somewhere
defines how much data is expected?
I hope that helps. Regards,
Shan Pin Koh