Hello
is there any way to maintain 0 in the LCD?
for example i want to show the clock from RTC and the time now is 04:04 but the display will only show 4:4
i already ask similar question a few month ago but unfortunately XOD still not support it
cast-number-to-hex-string in gweimer/utils does this for hex numbers. Just change the fmt string from “0x%%0%uX” to “%%0%ud” and it should work for decimal numbers. Use the new node you create to format the string to feed to LCD.
hmm its weird but i can’t install your utils it said xod_bkp/core has no version latest.
can you help?
just to be clear what i mean is not decimal number but the “0” in first line always gone (0x)
for the hours its not a big deal but for the minutes it make confusion in reading.
example now is hour 5 minutes 02 the lcd will show 5:2 instead of 5:02 or 05:02
for the decimal (digit behind dot) i always get rid using format-number
Bah…I need to cleanup & get rid of that extra folder. I’ve updated the gweimer/utils, so you should be able to use it now; let me know if there are still issues. The cast-number-to-hex-string uses the DIG pin to specify digits to the left of the decimal, not the right of the decimal, so it should be what you are looking for. If you copy the code for this node, you should be able to create what you want for decimal numbers changing the fmt string as specified above.