Go Down

Topic: LiquidCrystal_I2C - shorten float to ony digit after point (Read 87 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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy