Hello Y'all,
So I'm kind of new to Arduino and Max/MSP and I'm having some issues. Basically, I have two separate piezo sensors that send out date when I tap them. In Arduino it shows the separate values, but when I use Max I don't know how to separate these values from the serial.
Arduino
int analogPin = A0; // potentiometer wiper (middle terminal) connected to analog pin 0
int analogPin1 = A1; // potentiometer wiper (middle terminal) connected to analog pin 1
// outside leads to ground and +5V
int val0 = 0; // variable to store the value read
int val1 = 0;
void setup() {
Serial.begin(9600); // setup serial
}
void loop() {
val0 = analogRead(analogPin); // read the input pin
val1 = analogRead(analogPin1);
Serial.println(val0); // debug value
Serial.println(val1);
delay(100); // delay to avoid overloading the serial port buffer
}
max.doc (57.5 KB)


