You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
parseFloat is not able to parse positive float numbers
Detailed problem description goes here.
I want to send float numbers from Arduino UNO to ESP8266. I2c was my first choice but unfortunately ESP8266 does not support receiver mode and I can not make ESP8266 master as there are time critical threads running on UNO and when it is free, it sends telemetry data to ESP8266.
Hence, I am attempting to receive data using serial and parseFloat. However, the parser is not able to parse the positive float numbers and also does not allow me to modify the SKIP parameters.
Any help would be greatly appreciated.
Sender Code : (Arduino UNO)
voidsetup()
{
Serial.begin(115200);
}
float x = 157.50;
voidloop()
{
// Start the packet
Serial.print(x);
x++;
delay(100);
}
Receiver Code : (ESP8266)
#include<Arduino.h>
#include<Stream.h>voidsetup() {
Serial.begin(115200);
}
voidloop() {
if (Serial.available() > 0) {
float myFloat = Serial.parseFloat();
//prints the received float number
Serial.print("I received: ");
Serial.println(myFloat);
}
}
The text was updated successfully, but these errors were encountered:
Basic Infos
Platform
Settings in IDE
Problem Description
parseFloat is not able to parse positive float numbers
Detailed problem description goes here.
I want to send float numbers from Arduino UNO to ESP8266. I2c was my first choice but unfortunately ESP8266 does not support receiver mode and I can not make ESP8266 master as there are time critical threads running on UNO and when it is free, it sends telemetry data to ESP8266.
Hence, I am attempting to receive data using serial and parseFloat. However, the parser is not able to parse the positive float numbers and also does not allow me to modify the SKIP parameters.
Any help would be greatly appreciated.
Sender Code : (Arduino UNO)
Receiver Code : (ESP8266)
The text was updated successfully, but these errors were encountered: