But unfortunately I cant send MORE of them. I bet it is just simple solution, but i just cant solve it.
Variables I am trying to get are numbers. I was experimenting with Serial.parseInt() but I just cant get it right can you provide an example in you answer please?
Simple serial code that captures a comma , delimited string from the serial monitor, evaluates the captured String, then operates the arduino LED if the appropriate data has been received.
//zoomkat 3-5-12 simple delimited ',' string parse
//from serial port input (via serial monitor)
//and print result out serial port
//send on, or off, from the serial monitor to operate LED
int ledPin = 13;
String readString;
void setup() {
 Serial.begin(9600);
 pinMode(ledPin, OUTPUT);
 Serial.println("serial LED on/off test with , delimiter"); // so I can keep track
}
void loop() {
 if (Serial.available()) {
  char c = Serial.read(); //gets one byte from serial buffer
  if (c == ',') {
   Serial.println(readString); //prints string to serial port out
   //do stuff with the captured readString
   if(readString.indexOf("on") >=0)
   {
    digitalWrite(ledPin, HIGH);
    Serial.println("LED ON");
   }
   if(readString.indexOf("off") >=0)
   {
    digitalWrite(ledPin, LOW);
    Serial.println("LED OFF");
   }  Â
   readString=""; //clears variable for new input
  }Â
  else { Â
   readString += c; //makes the string readString
  }
 }
}