Max & Arduino serial communication, new & improved, with notes
(Fixed a bug 3/26/07, so if you downloaded before, try again)
Just in case you have any trouble opening the Arduino script, here it is for you to cut and paste:
//Arduino to Max example - to be used with accompanying Max patchint incomingByte = 0; // for incoming serial data
void setup() {
Serial.begin(9600); // opens serial port, set baud rate
}void loop() {
if (Serial.available() > 0) { // send data only when a byte is received
incomingByte = Serial.read(); // read the incoming byte
Serial.print("I received: "); // say what you got
Serial.println(incomingByte, DEC);
}
}
Comments
The patch makes a lot more sense... anyone else reading the arduino script as garbage, though? It's not opening right for me.
Posted by: Jesse
|
March 23, 2007 8:17 PM
Not sure what the problem is with the script download, but anyway the text is now included in the post - just cut n paste.
Posted by: Hoberman, Perry
|
March 24, 2007 12:32 AM
I keep trying to get this patch up and running. Or, it is running, and I just don't know how to use it properly.
Either way, I'm still going to need a little help with this one.
Posted by: Mike Stein
|
March 25, 2007 9:12 PM
OK, I tried to make it clear, but obviously it wasn't clear enough.
So now I've made it obvious. (new version replaces old).
And please try to be a bit more specific when you're having trouble.
Posted by: Hoberman, Perry
|
March 26, 2007 5:53 AM