Go Down

Topic: Multiple serial bytes (Read 506 times) previous topic - next topic

tsukukinsei

Hi im wondering how i can read more than one byte from serial communications. I basically just want to know if a character string as come in. im pretty new to arduino and im not sure if i should use an array or write values to the eeprom can anyone help?

John_Ryan

You can receive a string of characters over serial. Just use a character to initiate the conversation and another character as a terminator.

So if you wanted to send the string "John" you might send "0John9". Then tell your program if it receives a "0" expect more characters, then if it receives a "9" all the characters have been sent. This allows the characters to be received in the order they were intended.

There's quite a bit around the forum on the subject. Point is, it's very do'able, so you needn't worry that your flogging a dead horse .. or so to speak = )  

Go Up