How to print Float number on HD44780?
-
- Posts: 143
- http://meble-kuchenne.info.pl
- Joined: Tue Oct 19, 2021 9:31 am
- Has thanked: 73 times
- Been thanked: 5 times
-
- Matrix Staff
- Posts: 1786
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 455 times
- Been thanked: 621 times
Re: How to print Float number on HD44780?
Hello,
The easiest way is to convert the float to a string and then print the string.
for example this would convert the float to a string with 2 decimal places.
StrVar = FloatToString$(FloatVar, 2)
Most if not all the LCD components should now have the PrintFloat macro, you might need to do a Help -> Library update and do a full component update to make sure you've got the latest versions of the LCD components.
If not then which specific component are you using and we can look into adding the function.
The easiest way is to convert the float to a string and then print the string.
for example this would convert the float to a string with 2 decimal places.
StrVar = FloatToString$(FloatVar, 2)
Most if not all the LCD components should now have the PrintFloat macro, you might need to do a Help -> Library update and do a full component update to make sure you've got the latest versions of the LCD components.
If not then which specific component are you using and we can look into adding the function.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Matrix Staff
- Posts: 1786
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 455 times
- Been thanked: 621 times
Re: How to print Float number on HD44780?
Ok, I've been through and added the function for you now.
Please let us know if you have any problems.
Please let us know if you have any problems.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel