You have to read the Arduino code that comes with the abstractions to understand. The tags are used to separate values or lists of values. If you want to send one value per tag you should do something like this:
Serial.print("value_ch0 "); // mind the white space after the tag name
Serial.println(value1); // I assume that 'value1' here is a variable that holds the value you want to send
Serial.print("value_ch1 ");
Serial.print(value2);
Though this is rather cumbersome, it's better to do this in a loop, like this:
for (int i = 0; i < numCh; i++) {
// construct a string like "value_ch0 ", "value_ch1 ", etc. using std::to_string from C++
Serial.print("value_ch" + to_string(i) + " ");
Serial.println(values[i]); // this example assumes you have all your values in an array called "values"
}
But you could also use just one tag and send all your values under that tag and in Pd separate them with [unpack]
. In this case the code would be something like this:
Serial.print("values "); // take care to include the white space
for (int i = 0; i < numValues; i++) {
Serial.print(values[i]);
Serial.print(" "); // print a white space to separate values
}
Serial.println(); // finally print the newline character to denote the end of the list