String str = String("1240,87000,10,30,20,1200"); // the string to split
Vector <long> numVector; // long Vector
void setup() {
Serial.begin(9600);
pinMode(48, OUTPUT); // turn ON wiring hardware LED
digitalWrite(48, HIGH);
splitString(str,',',numVector); // split str using ',' as separator and store the resolt on numVector
for(int i=0; i< numVector.size(); i++) { // print the contents of numVector
Serial.println(numVector.get(i), DEC);
}
}
void loop() {
}
|