Sending PIN ID to MATLAB

Hi,

i am building a sensor array in order to measure concentration of solids during sedimentation. Arduino will read one Sensor after the other and send first the PIN number and then the measured signal (median of 100 reads).

I use println.This automatically sends an ASCII string. The pin number is an int type and the signal a floating number. But how can MATLAB distinguish between them ?

Any suggestions ?

Thank you

Moritz

Any suggestions ?

Post your code!
Ask your MATLAB questions at the Ford dealer, not the Arduino forum.

Well, you did ask...

for (int sensorpin=1; sensorpin=SENSOR_NUMBER;sensorpin++){
SetMuxPin(sensorpin);
SetDemuxPin(sensorpin);
int voltage_out=readSensor(sensorpin);
String stringOne = "SensorID:";
String stringTwo = stringOne + sensorpin
Serial.println(stringTwo);
Serial.println(voltage_out);
}

[\quote]

"Add a string to your number" would be a solution and an answer someone else could find usefull.

The code i posted is my guess how it could work. Not sure if it works.

Why bother with Strings?

  int voltage_out=readSensor(sensorpin);
        Serial.print (F("SensorID:"));
        Serial.print ( sensorpin);
        Serial.print (F(" "));
        Serial.println(voltage_out);

Look at the matlab reference, particularly the fgetl function

Why bothering with strings? Well you are right. Probably generating a vector with the sensor values lined up according to their position would be the easiest solution.

I will post my code, when ready.

Thank you