 }
 
 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.

void setup() {
  Serial.begin(250000);

  pinMode(analogPin1, INPUT);
  pinMode(analogPin2, INPUT);

  lcd.begin(16, 2);


LiquidScreen welcome_screen(welcome_line1, welcome_line2);

// Here there is not only a text string but also a changing integer variable.
LiquidLine analogReading_line(0, 0, "Analog: ", analogReading);
LiquidScreen secondary_screen(analogReading_line);

/*
 * The LiquidMenu object combines the LiquidScreen objects to form the
