Simple Serial
MaxMSP Arduino
int inByte = 0; // incoming serial byte
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT); // connect an LED here
}
void loop()
{
Temple University
School of Communications and Theater
Physical Computing Spring 2010
Chris Vecchio
• Serial.read receives one byte at a time
• Click on MaxMSP “97” message: Arduino pin 13 goes high
• Click on MaxMSP “98” message: Arduino pin 13 goes low
• These numbers are single ASCII byte values, arbitrarily chosen
1