Hello Guys,
I am using UTFT LIBRARY (UTFT - Rinky-Dink Electronics) for my project.
I am trying to display analog value from port A0 . The library only updates the screen when 'myGLCD.clrScr();' command is used.
I want to update the analog value as soon as the value changes without clearing the whole screen.
Request to get a solution for the same.
Here is the code:-
#include <UTFT.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];
UTFT myGLCD(ILI9225,11,13,10,8,9);
void setup()
{
randomSeed(analogRead(0));
// Setup the LCD
myGLCD.InitLCD();
myGLCD.setFont(SmallFont);
}
void loop()
{
int buf[218];
int x, x2;
int y, y2;
int r;
// Clear the screen and draw the frame
myGLCD.setColor(255, 0, 0);
myGLCD.fillRect(0, 0, 219, 13);
myGLCD.setColor(64, 64, 64);
myGLCD.fillRect(0, 162, 219, 175);
myGLCD.setColor(255, 255, 255);
myGLCD.setBackColor(255, 0, 0);
myGLCD.print("** Universal TFT Library **", CENTER, 1);
myGLCD.printNumI(analogRead(A0), CENTER, 15);
myGLCD.clrScr();
delay(5000);
}