Pages: [1]   Go Down
Author Topic: Multiple serial bytes  (Read 470 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
God Member
*****
Karma: 0
Posts: 731
skcor oniudrA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 = )  
Logged

Pages: [1]   Go Up
Jump to: