serial object and commas

mbiederman's icon

Hi Almighty list,

I am using an arduino to read some sensor values - and I receive them through the serial object just fine, and I group them together until I get a CR (ASCII 13) and that works OK.

What I need help with is to split the data up and recognize the commas. I think there must be a way with the regexp object but I am running into a wall there. Anyone got any tips? It seems fairly simple, but I havent found anything on the list...

the data comes in like this:

2010/11/1 17:18:2,959,710,660

year/mo/day hour:min:sec,Val1,Val2,Val3

I need to send the Val1,Val2,Val3 places in my patch for further processing....

Max Patch
Copy patch and select New From Clipboard in Max.

simplified patch below:

thanks!
matthew

Luke Woodbury's icon
Max Patch
Copy patch and select New From Clipboard in Max.

[fromsymbol] is your friend here, but I'm sure there's other ways:

mbiederman's icon

well, just goes to show you, 15 years of max and there are objects I never knew existed....you wouldn't believe the ways I was trying to do this! thanks!

Luke Woodbury's icon

Ha ha, I hear ya!