Capacitive Sensor to Max MSP

Ok so I am new to max and arduino.
I have used a arduino sketch to read pin 2 as a capacitive sensor.
the arduino patch is all good, it runs and the numbers display in the serial monitor.
How do I get Max to receive the same numbers as the arduino serial monitor?
I hope this makes sense, again just started.
thanks so much.

Hi
very briefly, the [serial] object in Max requires three things: a ‘port’ argument that identifies the COM port number of the Arduino (in Windows, this shows up in your hardware Device Manager); a baud rate argument which matches the Arduino baud rate (visible in the Serial Monitor window), and; a [metro] object to poll the [serial] object. So, I use [serial c 9600] with a [metro] attached at the input – your [serial] arguments may/will differ.

Depending on which version of Arduino you’re using, and which ‘sketch’ (roll-your-own, or Maxuino etc) you may need to add/change:

Serial.println(whatever);

to

Serial.print(whatever, BYTE); or Serial.write(whatever);

But there are too many unknowns here: Arduino version, sketch etc etc. Experiment with the Arduino Examples and these patches:

Thanks so much for the replies.
I'm not understanding this yet…
I can't find the COM port number of the arduino.
I think I should have provided more information to start out with.
I'm running OSX 10.7.4, Macbook pro, Arduino UNO, Latest version of Arduino software and here is the
arduino sketch. I'm using capacitive paint to create a proximity sensor.

Attachments:

Send the "print" message to the serial object to get a list of the connected serial ports on your computer. Your Arduino may not be connected to port a.

Increase the speed of your metro. You’re only poling the serial port every second, but your arduino is sending information up to 200 times a second.

Additionally, Max’s serial object expects raw bytes (sent by Serial.write() on the Arduino). When you’re using Serial.println(), you’re sending ASCII encoded information. The float box you have connected to the serial object won’t be much help here. Because println also sends a newline/carriage return combo, you can use use [select] and [zl group] to filter the message from the Arduino.

See below :

— Pasted Max Patch, click to expand. —

Copy all of the following text. Then, in Max, select New From Clipboard.

Send the "print" message to the serial object to get a list of the connected serial ports on your computer.

When I click the "print" message, Max freezes for about 5 seconds, and nothing appears in the Max window… Any thoughts? I can see from my Parallax Propeller Serial Terminal software that COM 4 is available to connect, so I don’t see why a list of at least one open serial port isn’t showing up.