 }
 
 void loop() {
-  /*
-   * Check if the analog values have changed
-   * and update the display if they have.
-   */
-  if (analogReading1 != lastAnalogReading1) {
-    lastAnalogReading1 = analogReading1;
-    menu.update();
-  }
-  if (analogReading2 != lastAnalogReading2) {
-    lastAnalogReading2 = analogReading2;
-    menu.update();
-  }
-
-  // Periodic reading of the analog pins.
+  // Periodic reading of the analog pin.
   if (millis() - lastMs_check > period_check) {
     lastMs_check = millis();
-    analogReading1 = analogRead(analogPin1);
-    analogReading2 = analogRead(analogPin2);
+    analogReading = analogRead(analogPin);
+    /*
+     * Check if the analog value have changed
+     * and update the display if it has.
+     */
+    if (analogReading != lastAnalogReading) {
+      lastAnalogReading = analogReading;
+      menu.update();
+    }
   }
 
   // Periodic switching to the next screen.

 * - LCD Cathode to ground
 * - ----
 * - some analog input to Arduino pin A1 (unconnected also works)
 * - some analog input to Arduino pin A2 (unconnected also works)
 *
 * Created July 24, 2016
 * by Vasil Kalchev

LiquidCrystal lcd(LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7);

/*
 * Variable 'analogReading' is later configured to
 * be printed on the display. 'lastAnalogReading'
 * is used to check if the variable has changed.
 */
const byte analogPin = A1;
unsigned short analogReading = 0;
unsigned short lastAnalogReading = 0;

/*
 * Variables used for periodic execution of code. The first one is the period
 * in milliseconds and the second one is the last time the code executed.
 */
unsigned int period_check = 1000;
unsigned long lastMs_check = 0;

unsigned int period_nextScreen = 5000;
unsigned long lastMs_nextScreen = 0;

/*
 * LiquidLine objects represent a single line of text and/or variables
