inserting 2 numbers at same time in serial monitor?

Hello, i was just wandering could i type 2 separated numbers or word and number at same time? i searched on other forums but nothing useful... anyway lets say i want type servo number and degrees at same time, so i dont need type " servo1 " then enter and then " 90 ", but lets say "servo1 90" or "servo1-90" or "servo1/90" or whatever to separate them?

Yes, absolutely.

Have you read the Serial Input Basics thread? That should cover this.

Serial Input Basics - simple reliable ways to receive data.

...R

sorry, im very fresh and didnt really understand how to do it from there :/

cr0wl: sorry, im very fresh and didnt really understand how to do it from there :/

Have you loaded and run the serial input programs? Doing this and then tweaking them in small ways to observe results will expand your understanding. Keep in mind that these are examples, they probably won't do exactly what you need. They are stepping stones you can use to create more advanced/custom code.

Since you will at some point need to parse the input data, some familiarity with the AVR string library will be helpful.

cr0wl: sorry, im very fresh and didnt really understand how to do it from there :/

If you describe what you did not understand I will try to help.

...R

well i know how to insert only 1 per time with this code

Part of code

void loop()
{ 
 while(Serial.available()>0)
 { 
 servo=Serial.parseInt(); 
 num2=Serial.parseInt();  

 if(servo==1){servo1.write(num2,50,true);}

 }
}

but i dont know any further

i'm in a bit hurry so dont have lot of time to research so could you please highlight me part that i need so i can edit and use it?

cr0wl: i'm in a bit hurry so dont have lot of time to research

That's your problem ;) You can always pay someone if you need it :)

cr0wl: so could you please highlight me part that i need so i can edit and use it?

Uhm, pretty much everything ;)

cr0wl: well i know how to insert only 1 per time with this code

May I suggest that you try the parse example in Serial Input Basics. Get the example working the way it is intended and after that see about modifying it to do exactly what you need.

...R