Forums > MaxMSP

serial object and commas

Nov 01 2010 | 9:26 pm

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….

simplified patch below:

-- Pasted Max Patch, click to expand. --


Nov 02 2010 | 9:36 am

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

-- Pasted Max Patch, click to expand. --

Nov 02 2010 | 2:31 pm

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!

Nov 02 2010 | 3:38 pm

Ha ha, I hear ya!

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP