Go Down

Topic: Multiple serial bytes (Read 559 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy