I hope someone will be able to help. I have an array with 4 elements coming from Arduino. I see each one without issue via [print] method after [fudiparse] (or after [cyclone/fromsymbol] if I use a different method), but I only see the first 2 when I unpack them!
In despite of spending hours trying different methods, I cannot get this to work in 1:44 min video:
-
Pure data - Help needed with unpack (2 elements instead of 4)
-
Here resumed as a picture if easier to understand:
-
The messages come one by one (or two by two) so the
unpack
never get a 4 items list.You can accumulate the messages to 4 this way:
Work in progress : FCPD a FreeCAD PureData connexion
-
@freq63 +1 to @FFW, but your patch as is suggests you are sending the data incorrectly. On the Arduino side, try printing 4 floats on a single line separated by spaces, then terminate the line with /n (i.e. use Serial.println to terminate the line). You can see an example for 2 floats here: https://forum.pdpatchrepo.info/topic/13086/arduino-to-pd-vanilla/8
-
you could repack them into a 4-pack if you put the first two and then the second two hit the trigger and make the pack go off. then re-unpack them.
-
@freq63 said:
Here resumed as a picture if easier to understand:
Aargh. Can't edit my post so here my coment; written in green we are supposed to read "but all 4 elements get printed separately without problem" as seen in my video. Without, not with! Sorry for the typo.
Thanks a lot for the precious help. I'll give my best to try to understand the answers and report back if I'm stucked. I didn't know unpack cannot accept 4 values.
What I find confusing is the fact that all 4 values are printed without issue separately before unpack.