[PD] comport stream of data (an old favorite!)

Nicholas Ward nicholas.ward at cs.tcd.ie
Tue Mar 21 00:09:24 CET 2006


Hi all, hope someone can help, Ive been trawling through the archives 
but am still quite stuck.

I have a microcontroller sending the status of 9 sensors to pd via 
comport.
So the data in z term looks like below

1C3 165 26E 2A7 2D8 255 2C4 2C7 27C
  1BE 160 26F 2A6 2D7 254 2C5 2C7 275
  1BB 15E 26C 2A5 2D7 252 2C5 2C7 27A

9 hex values separated with a space (ascii 32) and finishing with 
carriage return and line feed (ascii 13 10)
In PD it looks something like
13 10 32 50 65 55 32 50 65 60 32 58 45 56 32 54 54 54 32 65 64 63 32 50 
65 55 32 50 68 55 32 50 68 55 32 46 45 45 13 10 32 etc

Can somebody please point me towards getting the stream of ascii values 
(38 values per line) converted into 9 decimal values.
Ive been trying to filter out each line using [route 13] into [route 
10] and also looking at repack and pack but to no avail.

Ive come across a mention of any2ascii but couldnt find it compiled for 
os x.

Many thanks
Nicky





More information about the Pd-list mailing list