How to display a float variable on lcd?

I want to display the value of a float variable on SV-328 LCD, but it doesn’t show it. I’ve tried to use printf, but it only displays a ‘?’ . I wonder how can I do it?

Hi,

Not sure what development environment you are using. I use WinAVR and needed to add these linker arguments to my project to enable printing floats:

-Wl,-u,vfprintf -lprintf_flt -lm

Beware adding these will significantly increase your code size.

Here is a link I found that may help you:
stackoverflow.com/questions/9059 … embedded-c

Using a search engine can help you find answers!

Mike

Thank you, Mike!