Using learn esp32 with arduino IDE
mod 10_1_2 sender
Changed Ln 21 float to double
Changed Ln 67 myData.c = 3.141592654
mod 10_1_3 receiver
Ln 16 from float to double c;
still receiving truncated 3.14 instead of 3.141592654
Could you help me to understand why.
Zoltan
Hi.
I’m not sure what might be the issue.
Have you tried to send it as a char array and then convert it to a float number? That can be a workaround…
Regards,
Sara
I have done something similar to your solution.
as a float it sends out 3.14 NOT 3.141592654
Than
I defined as a double and multiplied the value by 1000 and on receive defined as double I divided by 1000
so I got the precision I wanted but it is not an elegant solution