UTFT turns white

Hi,

I’m trying to make a display of 3 temperature sensors. I’m not using the Touch.
The hardware that I have is:

  1. Arduino UNO
  2. A Touch Screen/ TFT LCD/ SD Card Shield
  3. 2.8 TFT 240x320 from saintsmart (ILI9325D)
  4. 3 Dallas 18B20 sensors

The problem that I have is that after a while (10-15 min) the display turns completely white and freezes. It is possible that the memory gets full? Is any way to clear the buffer or something like that?
What could it be?

This is the code:

#include <UTFT.h>
#include <OneWire.h>
#include <DallasTemperature.h>


//define input pin for 1-wire bus. The Differduino PCB uses digital pin 7
#define ONE_WIRE_BUS 7


// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

//SET YOUR THERMOMETER ADDRESSES!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
byte aguaTemp[8] = {0x28, 0x66, 0x5A, 0xCD, 0x04, 0x00, 0x00, 0x7D};
byte aireTemp[8] =  {0x28, 0x8E, 0xD5, 0x9A, 0x03, 0x00, 0x00, 0x75};
byte tuboTemp[8] = {0x28, 0x6B, 0xBD, 0xE7, 0x03, 0x00, 0x00, 0xAD};


// Initialize display
// ------------------
UTFT    myGLCD(ILI9325D_16ALT, 19, 18, 17, 16);


// Declare which fonts we will be using
extern uint8_t BigFont[];
extern uint8_t Retro8x16[];


void showLCD()
{ 
  myGLCD.fillScr(0,0,0);
  myGLCD.setFont(BigFont);
  myGLCD.setColor(255, 255, 255);
  myGLCD.setBackColor(0, 0, 0);
  myGLCD.print("Sistema de Control",CENTER,20);
  myGLCD.print("de temperaturas",CENTER,40);
  myGLCD.setFont(Retro8x16);
  myGLCD.print("Centre Grafic de Calafell", CENTER, 220);

  myGLCD.setFont(BigFont);
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (5, 80, 186, 105);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (5, 80, 186, 105);
  myGLCD.setBackColor(0, 0, 255);
  myGLCD.print("Temp. Tubo:", 10, 85);
  
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (5, 120, 186, 145);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (5, 120, 186, 145);
  myGLCD.print("Temp. Agua:", 10, 125);

  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (5, 160, 186, 185);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (5, 160, 186, 185);
  myGLCD.print("Temp. Aire:", 10, 165);
  
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (200, 80, 318, 105);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (200, 80, 318, 105);
  
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (200, 120, 318, 145);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (200, 120, 318, 145);
  
  myGLCD.setColor(0, 0, 255);
  myGLCD.fillRoundRect (200, 160, 318, 185);
  myGLCD.setColor(255, 255, 255);
  myGLCD.drawRoundRect (200, 160, 318, 185);
}

/*************************
**  Required functions  **
*************************/

void setup()
{
  // Initial setup

  myGLCD.InitLCD();
  myGLCD.clrScr();
  showLCD();

  // Start up the library
  sensors.begin(); 
 }

void loop()
{   
    sensors.requestTemperatures(); // Send the command to get temperatures
 
    myGLCD.setColor(255, 255, 0);  
    myGLCD.setBackColor(0, 0, 255);  
    myGLCD.printNumF(sensorValue(aireTemp), 2, 210, 85);  
    myGLCD.print("C",300, 85);
    myGLCD.printNumF(sensorValue(aguaTemp), 2, 210, 125);
    myGLCD.print("C", 300, 125);
    myGLCD.printNumF(sensorValue(tuboTemp), 2, 210, 165);
    myGLCD.print("C", 300, 165);
  

    delay(1000);

}

float sensorValue (byte deviceAddress[])
{
  float tempC = sensors.getTempC (deviceAddress);
  return tempC;
}

Please post a link to the actual Display, the actual Adapter Shield.

16-bit controllers are not normally used with a Uno.

UTFT expects Displays from respectable Manufacturers e.g. Itead, ColdTears, ... Mr Karlsen does not have a high opinion of Sainsmart.

David.