Hello once again Arduino lovers,
I have asked something similar to the past but now I have gained some knowledge on the topic.
So I have two arduinos one uno and one mega. The arduino UNO sends messages in that way below as shown in the code (why is that? because of a legacy controller sends exactly the same way the data as im emulating from uno)
So now the Mega I'm planning to use it as a rs232 to canbus converter but thats for the future. Now as you can see from the arduino MEGA code I definely receive the floats, can someone help me if i can do something to the mega and separate those values that i get and store them to different variables ??
Have a look at the examples in Serial Input Basics - simple reliable non-blocking ways to receive data. There is also a parse example to illustrate how to extract numbers from the received text.
The technique in the 3rd example will be the most reliable. It is what I use for Arduino to Arduino and Arduino to PC communication.
You can send data in a compatible format with code like this (or the equivalent in any other programming language)
If the sole purpose is to exchange data between two Arduinos you may find the I2C is more versatile. Have a look at this Arduino to Arduino I2C Tutorial
If you decide to stay with serial, use a software serial port n the Uno to talk with one of the extra hardware serial ports of the Mega (Serial1, Serial2 or Serial3). Then you can use the (USB) hardware serial ports to upload code and monitor program flow.