So I connected two Nanos with their RX and TX ports. I use the Softwareserial library for this.
I'm trying to send two different datas, a byte called "mode1" and an integer called "moyenne".
My problem is that this library can just read the incoming data, and does not make any difference between my "mode1" and my "moyenne". I'd like the receiving Nano to store these 2 data seperatly.
Thank you for your help, I haven't found any thing on multiple topics...
SoftwareSerial on HardwareSerial pins is a waste.
You will have to implement a system so you can differentiate between the model and the moyenne.
If you send the data in binary format, it's a bit tricky but can be done by detecting the start of a message based on the duration that the receiver did not receive bytes.
If you send text (print functions), have a look at Robin's updated Serial Input Basics thread for ideas; example 5 is probably what you're looking for in that case.
Your topic was Moved to it's current location / section as it is more suitable.
Could you also take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
Thank you for your answer ! I will have a look at Robin's thread
Sending data in CSV (comma separated values) terminated by a new line is common format.
See my reading and parsing GPS (CSV data) example
Another option would be to use I2C. This Arduino to Arduino I2C Tutorial may be of interest.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.