Displaying real-time data through LCD



Hi,

As of now, I can display text through a 4x20 LCD ("Hello World!").
However, I need to display real-time data which is computed every 2secs.

In the sample codes that I have seen (and have used), the character is
sent one at a time:

lcd_puts(const char *s){
while(*s)
lcd_write(*s++);
}

and the input is a predefined string:

in main function:
lcd_puts("Hello World!");

My question is, how can I modify my code to display real-time data (int or
float)?

I'm thinking of something like the printf function which will be called
everytime data needs to be displayed:

printf("Reading: %d",data);

But how can I implement this if the data is a predefined string and if the
data is sent one char at a time?

Thank you!

.