Hi!
If I try to print a number (float) in the display I do not get any digit after the komma
The same if I try to convert from float to String and print the string.
same result if I read out the value Intgr and convert to string.
It work in LCD display.
Is there another way, please?
Br Jorgen
Ili9488 Print number string!
-
- Posts: 777
- http://meble-kuchenne.info.pl
- Joined: Thu Dec 03, 2020 8:25 pm
- Location: Denmark
- Has thanked: 670 times
- Been thanked: 175 times
Ili9488 Print number string!
- Attachments
-
- To str.PNG (29.8 KiB) Viewed 1259 times
-
- NySolcelle.fcfx
- (26.79 KiB) Downloaded 59 times
-
- Matrix Staff
- Posts: 1472
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 204 times
- Been thanked: 349 times
Re: Ili9488 Print number string!
The code in your "AMPS" macro appears to be working and the "Amps" float variable is correctly being converted to a string and being displayed on the LCD. But this macro is never called in your program.
If you run the "AMPS" macro directly (using the dropdown underneath the "run/go" button then you will see this macro working correctly.
If you run the "AMPS" macro directly (using the dropdown underneath the "run/go" button then you will see this macro working correctly.
-
- Matrix Staff
- Posts: 1924
- Joined: Wed Dec 02, 2020 11:07 pm
- Has thanked: 623 times
- Been thanked: 645 times
Re: Ili9488 Print number string!
Hi.
Have made some small changes for you.
If you convert an integer to a string there will only be whole numbers.
The format you need is MyString = FloatToString$ (MyFloat,x)
Where x = required number of decimal places. As you can see, if you enter a minor and a major value, more numbers will appear on the component scale.
Have made some small changes for you.
If you convert an integer to a string there will only be whole numbers.
The format you need is MyString = FloatToString$ (MyFloat,x)
Where x = required number of decimal places. As you can see, if you enter a minor and a major value, more numbers will appear on the component scale.
- Attachments
-
- NySolcelle v2.fcfx
- (27.08 KiB) Downloaded 57 times
Martin