void loop() { for (int thisSensor = 0; thisSensor < 3; thisSensor++) { int sensorValue = analogRead(thisSensor); Serial.print(sensorValue, DEC); // if this is the last sensor value, end with a println(). // otherwise, print a comma: if (thisSensor == 2) { Serial.println(); } else { Serial.print(","); } } }