Go Down

Topic: how to interpret the serial data (Read 2 times) previous topic - next topic

latee

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...

PaulS

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.

latee

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

AWOL

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.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

latee


Go Up