How to pass a changing value to a graphic display using Arduino? I am using an EA DOGM132-5 graphic display, they also have provided a library for Arduino, so everything is nice and easy. The library has a function for easily passing a string to the LCD.

void dog_7565R::string(byte column, byte page, const byte *font_adress, const char *str)
{
unsigned int pos_array;                                         //Postion of character data in memory array
byte x, y, column_cnt, width_max;                               //temporary column and page adress, couloumn_cnt tand width_max are used to stay inside display area
byte start_code, last_code, width, page_height, bytes_p_char;   //font information, needed for calculation
const char *string;

start_code   = pgm_read_byte(&amp;font_adress[2]);  //get first defined character
last_code    = pgm_read_byte(&amp;font_adress[3]);  //get last defined character
width        = pgm_read_byte(&amp;font_adress[4]);  //width in pixel of one char
page_height  = pgm_read_byte(&amp;font_adress[6]);  //page count per char
bytes_p_char = pgm_read_byte(&amp;font_adress[7]);  //bytes per char



if(type != DOGM132 &amp;&amp; page_height + page &gt; 8) //stay inside display area
        page_height = 8 - page;
  else  if(type == DOGM132 &amp;&amp; page_height + page &gt; 4)
    page_height = 4 - page;



//The string is displayed character after character. If the font has more then one page, 
//the top page is printed first, then the next page and so on
for(y = 0; y &lt; page_height; y++)
{
    position(column, page+y); //set startpositon and page
    column_cnt = column; //store column for display last column check
    string = str;             //temporary pointer to the beginning of the string to print
    digitalWrite(p_a0, HIGH);
    digitalWrite(p_cs, LOW);
    while(*string != 0)
    {   
        if((byte)*string &lt; start_code || (byte)*string &gt; last_code) //make sure data is valid
            string++;
        else
        {                           
            //calculate positon of ascii character in font array
            //bytes for header + (ascii - startcode) * bytes per char)
            pos_array = 8 + (unsigned int)(*string++ - start_code) * bytes_p_char;
            pos_array += y*width; //get the dot pattern for the part of the char to print

    if(type != DOGM132 &amp;&amp; column_cnt + width &gt; 128) //stay inside display area
                width_max = 128-column_cnt;
    else if(type == DOGM132 &amp;&amp; column_cnt + width &gt; 132)
       width_max = 132-column_cnt;
            else
                width_max = width;

            for(x=0; x &lt; width_max; x++) //print the whole string
            {
                spi_out(pgm_read_byte(&amp;font_adress[pos_array+x]));
                //spi_out(pgm_read_byte(&amp;font_adress[pos_array+x])); //double width font (bold)
            }
        }
    }
    digitalWrite(p_cs, HIGH);
}
}


So I just use the function in the sketch with the variables I want and I can easily show a string, but I want to show a changing value for example a temperature reading Tc.

int ThermistorPin = 0;
int Vo;
float R1 = 10000;
float logR2, R2, T, Tc, Tf;
float c1 = 1.009249522e-03, c2 = 2.378405444e-04, c3 = 2.019202697e-07;

Vo = analogRead(ThermistorPin);
R2 = R1 * (1023.0 / (float)Vo - 1.0);
logR2 = log(R2);
T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2));
Tc = T - 273.15;


But the string function doesn't support variables. Can someone help me to adjust the string function to take variables or perhaps suggest a better way altogether?
You have to first convert the floating point value to a string, then pass the resulting string to the dog_7565R::string() function.

It looks like the standard sprintf() provided by Arduino does not support the %f format for floats, so you may have to find another way to convert it or write your own conversion function.