Moderator: igrr
If you want to store the output in a char array:
float val = 74.14;
char array[10];
sprintf(array, "%.1f", val); // %.1f for 1 decimal, %.2f for 2 decimals etc
// array contains your "new" value as a char array.
if you just want an integer: (just truncates, no rounding)
float val = 74.14;
int new_val = (int) val;
if you just want to print to serial:
float val = 74.14;
int n = 1 // number of decimals
Serial.print(val,n);