Hello Ladies and Gentlemen,
I need to send a value of e.g. 22.5 which is a float between two Arduino's over the UART. While I can use the following codes to send int data, I don't know how to do it as a float.
The sending arduino uses these instructions:
.
Whereas in the receiving arduino :
.
I need to send a value of e.g. 22.5 which is a float between two Arduino's over the UART. While I can use the following codes to send int data, I don't know how to do it as a float.
The sending arduino uses these instructions:
void setup() {
Serial.begin(9600);
}
void loop()
{
Serial.write(45);
}
Whereas in the receiving arduino :
int incomingByte = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0) {
incomingByte = Serial.read();
Serial.println(incomingByte, DEC);
}
}