Sending float with esp_now

I have this array to send float data by using esp_now but I cant sent all the floating point. For example this values {1.134, -2.7872, 3.2343, 4.49898}; sent as
{1.13, -2.78, 3.23, 4.49}
How can send all the numbers as it is ?

  float d[]={1.134, -2.7872, 3.2343, 4.498};
  for(int i=0;i<4;i++){
       esp_now_send(broadcastAddress,(uint8_t *) &d[i], sizeof(float));
  }

I always make a structure to send data by ESP-NOW.
It makes building the message and reading it so much easier.
Check out this tutorial on it. It demonstrates the use of structures. Getting Started with ESP-NOW (ESP32 with Arduino IDE) | Random Nerd Tutorials

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.