hi, I can't find any examples of interfacing multiple inputs (for example a potentiometre and a piezo).
does anyone has such an example ?
how would you do to send multiple sensors values through the serial port to processing (there only "one sensor at a time" examples on the arduino meets processing page).
and you want more, just write them in:
pin0Data = analogRead(0);
pin1Data = analogRead(1);
pin2Data = analogRead(2);
Then, if you want to send them to processing, just add them to the data being sent out the serial port.
Serial.println(pin0Data);
Serial.println(pin1Data);
Serial.println(pin2Data);
yes I got that already.
I know that I can tell processing to read serial until a line feed or carriage returnbut how can processing detect what sensor is sending the data.
You can print a character before the sensor data that corresponds to the sensor you're using. Then, in processing, check the first character of each line.