How to make arithmetic operations with float or double

So.
After many hours to make some tests, I can say :
atof() function DIDN’T work on my board.
I use instead the sscanf function.

here the code work as i want :

include "ui.h"

void calcul(lv_event_t* e) {
  const char* str1 = lv_label_get_text(ui_LabelVal1);
  const char* str2 = lv_label_get_text(ui_LabelVal2);

  float num1, num2;
  sscanf(str1, "%f", &num1);
  sscanf(str1, "%f", &num2);

  float result = num1 * num2;

  lv_label_set_text_fmt(ui_LabelResult, "%.3f", result);
}

Problem solved :slight_smile: