   
   tempF = getTempF(TMP_PIN);
   dial.setCV((int) tempF);
+  trend.addValue((uint8_t) tempF);
 }
 
 

// before the setup() routine.
#define LED1 10
#define LED2 2

#define TMP_PIN A4
#define tempUpdate 1000
#define trendUpdate 30000

float tempF;
long lastUpdate,lastTrendUpdate;

void setup() {
  Serial.begin(9600);
  pinMode(LED1, OUTPUT);
  pinMode(LED2, OUTPUT);
  pinMode(7,OUTPUT);
  digitalWrite(7,HIGH);
  canvas.init(TFT_LANDSCAPE);

  delay(1000);
  //Configure the widgets
  //=========================================  
    trend.setSize(100,50);
    trend.setColors(GRAY2,GREEN,GRAY1);
    trend.setLimits(75,85,95);
    trend.setHiLimit(85,RED);
    trend.setLowLimit(75,BLUE);
    trend.init();
    
    dial.setSize(50);
    dial.setColors(GRAY2,YELLOW,GRAY1);
    dial.setLimits(60,80,100);
    dial.init();
    dial.setHiLimit(90,RED);
    dial.setLowLimit(75,BLUE);

    grid.setSize(80,90);
    grid.setColors(GRAY2,WHITE,GRAY1);
    grid.setEventHandler(&gridEventHandler);
    grid.setName(1,"HI");
    grid.setName(2,"SP");
    grid.setName(3,"Low");
    grid.init();
    
    grid2.setSize(120,40);
    grid2.setColors(GRAY2,BLACK,GRAY1);
    grid2.setEventHandler(&gridEventHandler);
    grid2.init();
    
    numkey.setSize(120,180);
    numkey.setColors(GRAY1,BLACK,WHITE);

Dial dial = Dial();       // Memory used: (storage/ram: 4,760/64)  11756/355
Numkey numkey = Numkey(); // Memory used: (storage/ram: 2,370/59)  16,080/503
Buttongrid grid = Buttongrid(3,1);
Trend trend = Trend();

// Global variables
