hi
i have attached 2 arduinos by serial together . i want to send int from one to other! but i can just send up to 256 ! (8 bit )
what is the simplest way ?
best regards
hi
i have attached 2 arduinos by serial together . i want to send int from one to other! but i can just send up to 256 ! (8 bit )
what is the simplest way ?
best regards
One way is to split the int into 2 bytes with lowByte() and highByte() to send and use the same functions on the receiving end to re-combine them. Look in the language reference for syntax.
The serial input basics thread has some very good information on using the serial port for reliable non-blocking serial comms.
payam2000:
what is the simplest way ?
Something like this, in conjunction with the parse example in Serial Input Basics
int myNum = 12345;
Serial.print('<');
Serial.print(myNum);
Serial.println('>');
...R