Go Down

Topic: LiquidCrystal_I2C - shorten float to ony digit after point (Read 167 times) previous topic - next topic

cysign

Hi,
I wonder how to shorten a float using LiquidCrystal_I2C.


Let's say my number is

Code: [Select]
float myFLoat = 13.22769;
but I only wanted to show
Code: [Select]
13.2.


As far as I remember usually using print() it would be something like

Code: [Select]
print("my text %.1f", myFloat);


But this didn't work using LiquidCrystal_I2C.

david_prentice


cysign


Go Up