I need to read a float number from a height sensor using two Arduino boards (Arduino Nano every and Arduino UNO Wifi) simultaneously . One solution is reading the height number using Nano (Sender) and send data via serial communication to UNO (Receiver). I used the code below to send a float number from Nano to UNO using Serial1; however, the digits of the whole float number are printed on serial monitor individually (see UNO Serial monitor output below). I also used the code from this link (examples 2 and 4), Serial Input Basics - updated - #3 by Robin2, but none of them worked for my application. Any idea how to solve this issue?
I appreciate any help in advance.
Thank you,
Abbas
Wiring between Nano and UNO
Nano GND---->UNO GND
Nano Tx---->UNO Rx
Thank you for your help. I edited my code based on your suggestion. It could fix my previous issue; however I got new issue which question mark character (?) printed in the serial monitor (see the output of the serial monitor below); some times the whole line (first line), some times at the end of the number (50.89?) and sometimes in the middle (50.?89). Any idea to solve this issue?