how to interpret the serial data

can u please give me a sample that are receiving a serial data,that f the mcu receive a charater 'a' the corresponding data will store in a buffer and when the character 'b' is detected d corresponding character will store to other buffer..can u please give me a related sample

if (Serial.available ()) {
  int inChar = Serial.read ();
  switch (inChar) {
    case 'a': // do something
    break;
    case 'b': // do something else
    break;
   default: // do something completely else
  }
}

The code I gave you is just an incomplete example - you need to fill in the blanks, or you could rewrite as, say, a simple state machine. You original question wasn't specific.

ah...i know that it is incomplete i just want to know if it is applicable to what i want to do?tnx

the char 0999999999 will be save to a buffer

Which ONE key did you press to type the character 0999999999?

one key??i want to store it in a buffer...this character will be send by the computer to the arduino,if ahm..for example the original data is a099999bTYYYYU, IF character 'a' is detected the 099999 will be store to a buffer and if character 'b' is detected the TYYYYU will be store to another buffer....please help me to do this...

Proper use of capital letters and punctuation would really be appreciated here. You sound like a little boy whining.

You keep saying you want to store A character, and then you say that the character is 0999999999.

Well, I have news for you. 0999999999 is not a character. It is a string.

If you want to ask about how to read characters, and store them in an array AS A string, then say that. Don't keep referring to 0999999999 as a character.

i'm so sorry for that....im unfamiliar with this,,, ahm..is it possible to use the switch case function??plz help me

I've shown you how to wait for and read one character into one particular buffer called "inChar", and make a decision based on the value of that character. It isn't a great leap of imagination to read in further characters and read them into other buffers.

how can i do this?any advice?

Some application, a little effort, and maybe work through some of the examples supplied in the IDE.

plz...give me a specfic examples

It's been a while since I looked at the IDE supplied examples, but I'm pretty sure there's (at least) one on serial comms, and another on arrays. I'd start with those.

please give me the very specific examples in IDE pls???

I'm posting from my tablet, so I'm afraid I can't. What did you do to help yourself in the fifteen minutes between my last post and yours?

The problem looks to be that you're never printing the value of "inData" when it has some dta a in it. Move the final "print" inside the "started && ended" condition, but before you reset the string.

The problem? You didn't open the serial monitor, you didn't select the correct line speed, you didn't compile the code, you didn't upload the code, you didn't hit "send"... It works, perfectly.

im sory....it works it print but the problem is it auto scroll...

You'll have to explain what that means, and why you perceive it to be a problem.

THANK YOU very much...is it functional of what i want to do as what i said in my first post?