Hi,
I have a device sending comma-delimited float lists which come into pd as a byte stream.
They look like this: 123,332.43,-34.4,39,111
I am converting the bytes to text using [bytes2any] which seems to work fine but when I then try and unpack, I get errors.
I tried using [unpack f s f s f s f] (for 4 floats, each with commas in between them) and just not linking up the outlets for the commas, this works but my console gets filled with "unpack: type mismatch", but my number boxes are getting the floats correctly.
This is okay but I'd rather not have those unpack errors.
So I looked at this forum thread and tried using [symbol2list] but got the "no method for 'float'" error mentioned in that thread. So I tried putting my message through [symbol] first which gets rid of the error but I have a really weird output. Instead of printing the list it prints:
"print: list l i s t"
for the list contents which seems very strange.
Could it be that putting my message through [symbol] is clearing the message (because it doesn't know what to do) and then when I try and put it through s2l I just get a list made out of the letters "list"?
Here is a kinda pseudo version of my code:
[comport 4 9600]
|
|
[bytes2any]
|
|
[symbol]
|
|
| _ _[ , (
| |
[s2l]
|
|
[print]
(Using the comma there for the message box).
Does anyone have any ideas?
Thanks in advance