3.2 TFT Character display

Hi,

As a simple project I built a volt meter using the mega 2560 and the 3.2 LCD display from SainSmart. I got the display to work quickly and i was able to run the demo.
I made a few changes in the Volt Meter code i got from the Arduino project site so it would display the values on the 3.2 Display. I got the Volt Meter to work and it displays the information but I cant seem to get it to display the decimal point. It looks like its displaying rows of ASCII characters where the decimal should be.
in my code i tried changing the value in the PrintNumF (vin, 5, Center, 75) statement that represents the divider but as of yet no go. I get either a solid square or the ASCII characters. I've tried both the BigFont and the SevSegNumFont but they both do the same thing.

Any ideas how to resolve this issue?

Thanks!

In the statement , is the "5" the one that represents decimal point location ?

  1. Post your whole code. The problem is often not where we think it is. See the note on how to use this forum, section 7.
  2. Print your vin value out the serial port to check the value you are getting.
  3. Change your print statement to PrintNumF (1.23456F, 5, Center, 75) ; to check the print function.

I changed the values as you said and it still prints the decimal the same way.

The 75 is the y value for screen placement i could optionally add 3 more variables which would go like this according to the UTFT manual.

printNumF(num,dec,x,y,divder,length,filler)

num = value
dec decimal places
x = X
y= Y
divider is what character to use such as the decimal
lengh is the minimum lengh to display
filler is what to fill if the num is not long enough to meet the 5 decimal places.

The Problem must be in the library because even if i try to print a string like this

myGLCD.print("123.4567", CENTER, 75);

i still get that funky character for a decimal...

any idea of a fix?

Yeah. 7-Seg font only has numbers. Use BigFont, or modify 7-Seg font and add a '.'

BTW, this is why we ask people to post their whole code. I happen to know you are using UTFT, but other readers may not. It makes it very difficult to help people when they just post snippets of information.

How do I Modify the Font?

Try BigFont first to make sure this is the only problem.

I found it myself, Thanks for the Help!!!

Fix here..

http://www.henningkarlsen.com/electronics/r_fonts.php

This is absolutely what i was looking for. Thanks for the fonts link.