String temp_String = ""; void serial_str() { if(Serial.available()>0) { char inByte; inByte = Serial.read(); if (inByte!='/') temp_String = temp_String + inByte; else {Serial.println(temp_String); temp_String = "";} /*if ((model[model_count]==inByte[0])&&(model_count<5)) model_count++; else num_model = atoi(inByte);*/ } } void setup() { Serial.begin(9600); } void loop() { serial_str(); }