Simple serial data patch

Jan 28, 2012 at 4:21am

Simple serial data patch

I’m looking to build a simple patch that reads serial data from an Arduino.
I’d like a bang when the serial data reads 0.
My arduino is outputting 1′s and 0′s on usbmodem1d11.
Can someone help me with this code?

#61501
Jan 28, 2012 at 9:45am

In the Arduino IDE, go to: File->Examples->Communication->VirtualColorMixer

That’s got a basic Max patch you can copy and open from the clipboard. If you want a bang when it reads a zero, look at the [select] object.

#221898
Jan 28, 2012 at 1:54pm

Thanks. That looks at arduino’s analogue inputs though, right?
I’m not having any luck receiving the serial data from the arduino. If I monitor the serial port via the arduino IDE then I get a string of 1′s and 0′s, but i can’t seem to display them in max.

#221899
Jan 28, 2012 at 8:29pm

This is coming along nicely.

I’m getting very close to it functioning just as it should.

It’s reading serial data and detecting a change in its output signal.

Now, this patch has four audio tracks. I would like the audio tracks to play in sequence, looping back to the first when the last one ends, unless the serial data switch opens, in which case I would like the audio track to jump to the next track, then continue to play in sequence. I’m pretty sure I’m nearly there, just a tiny bit more help would be great!

Attachments:
  1. jackarduino.maxpat
#221900

You must be logged in to reply to this topic.