     index = 0;                                  // calculate the average:
   average = total / numReadings;
 
-fuelGage();
-fuelPressure();
+  screen_brightness();
+  fuelGage();
+  fuelPressure();
 
 
   if (page == 0 && purgeState == 0)


void setup()
{
  dayLightVal = analogRead(A10);
  backlightValue = 0.2138*dayLightVal + 20.5;
  analogWrite(backlightPin, backlightValue);

  Tft.TFTinit();                                        // init TFT library


  pressure = sumP / numReadings;
}

void screen_brightness()
{
  /*
   * Below is old code for the backlight brightness when the manual setting was still used, before upgrading to the auto brightness 
   * function with the photo-diode
  Serial.println(dayLightVal);
  backlightPerc = (0.0000003*(dayLightVal*dayLightVal*dayLightVal))-(0.0006*(dayLightVal*dayLightVal))+(0.397*dayLightVal);
  Serial.println(backlightPerc);
  Serial.println(backlightValue);
  backlightValue = ((backlightPercent*backlightPercent*backlightPercent)/3937) + 1.5;
  backlightValue = (127 * backlightPercent) / 50 + 1;
  analogWrite(backlightPin, backlightValue);
  */

  dayLightVal = analogRead(A10);
  backlightValue = 0.2138*dayLightVal + 20.5;
  analogWrite(backlightPin, backlightValue);
}


//float getVoltage(int pin)				        // function that reads the value of the temperature pin and returns it
// to be converted into a temperature value.
