Hello,
Suppose that i get constant data from Arduino (series of 1 and 0).
Is there a way to populate a list with this data that i get ‘on the go’?
And suppose that i added 20 items to this list. is there a way to initialize/empty the list and repopulate it with new 20 items?
Sounds like you and @alex.goft are working on the same problem? Similar, anyway.
Hello,
Is there a way to keep a “Global Variable” in grasshopper, such that it’ll be initialized to zero, and, for example, every time i’ll get 1 from Arduino it will be increment by 1 and every time ill get 0 it will be decremented by 1?
What i have tried:
[09]
(The python components simply truncated the current value via if block)
But it’s super slow
Thank you
HS_Kim
January 27, 2018, 6:10pm
3
Hi.
Why don’t you just record your series of data(0 & 1) and partition them with the number 20?
RecordData_re.gh (7.7 KB)
1 Like
how can i choose the first chunk of items (the latest created chunk of 20 items?)
I tried list items, but it gives back a single item and not list
HS_Kim
January 27, 2018, 6:38pm
5
You have several options – Use “Tree Branch” or “Split Tree” or “Explode Tree”…
thank you, with tree explode i get the first chunk created. but i need dinamically the last one (latest). I could figure out how the rest of the components help. could you please elaborate? choose the last 20 items in a list