UTFT.h Help

Howdy, First off I am new to Arduino and still learning, Sorry if this is a silly question :slight_smile:

ok I have a tft display and I am using the UTFT.H Library. I can display text by using

myGLCD.print("www.arduinoprojectshq.com", CENTER, 227);

But I am trying to work out how to display a variable, I know it is probably easy but any help would be great.

James

www.arduinoprojectshq.com

Search UTFT documentation, there is one command like printNum( or similar to do that.

Cool thanks for that .. I found the Doco, I got it working.

int num = 3000;
myGLCD.printNumI(num, 10, 20);

Next Question :slight_smile:

Lets Say I have a ODB2 Shield connected to my car and everything setup, All i need to do now is display the RPM value in real time, For testing purposes would this be the best way of doing so ?

void loop()
{

if (obd.ReadSensor(PID_RPM, rpm_value)) {
myGLCD.printNumI(rpm_value, 10, 20);
}

}

James
www.arduinoprojectshq.com

Yup. But only update the value if value changed. Also clear the zone, for example if you write "10" then "5" you need to append a " " space to clear the old number

Great thanks for that, I have found myGLCD.clrScr(); but that clears the screen. do you know how i can clear the zone ?

James

print " "